java는 c나 c++과 입출력이 많이 다르네요.
public class Main {
public static void main(String[] args) {
int arr[] = new int[10];
int[] arr2 = new int[10];
char cc[] = {'a', 'b'};
System.out.println(arr.length);
System.out.println(cc);
String str[] = new String[4];
str[0] = "zero";
str[1] = "first";
str[2] = "second";
System.out.println(str);
String[] members;
members = new String[]{"aaa"};
members = new String[]{"bbb"};
System.out.println(members[0]);
int doubleArray[][] = new int[5][10];
int doubleArray2[][] = {{1, 2}, {2}};
System.out.println(doubleArray2[0].length);
System.out.println(doubleArray[0].length);
String message;
Scanner scanner = new Scanner(System.in);
// System.out.println("메시지를 입력 하세요");
//
// message = scanner.nextLine();
//
// System.out.println("입력 메시지 \n" + message + "\n");
//
// int inter1 = scanner.nextInt();
// System.out.println(inter1);
// do{
// System.out.println("값을 입력하세요. 입력을 마치려면 Q를 입력하세요");
// message = scanner.nextLine();
// System.out.println("입력한 값은 : " + message + "입니다.");
// }while(!"q".equalsIgnoreCase(message));
Scanner scanner2 = new Scanner(System.in);
String inputtedLine = scanner.nextLine();
scanner2 = new Scanner(inputtedLine).useDelimiter(",");
int sum = 0;
while(scanner2.hasNextInt()){
sum += scanner2.nextInt();
}
System.out.println("SUM : " + sum);
// 1개의 char만 받기
char input = scanner.next().charAt(0);
System.out.println(input);
}
}