목록2024/10/10 (1)
한바다
java-ArrayIndexOutOfBoundsException 오류
☑️ ArrayIndexOutOfBoundsException package com.kh.conditionEx;import java.util.Scanner;public class ConditionEx { public static void method1() { Scanner sc = new Scanner(System.in); System.out.print("고객님의 나이를 입력하세요 : "); int age = sc.nextInt(); // 만약에 고객의 나이가 19세 이상이라면 성인입니다. 를 출력할 것 if (age >= 19) { System.out.println("성인입니다."); } } //최종 메서드 public static void main(String[] args) { met..
카테고리 없음
2024. 10. 10. 17:30