You are viewing a single comment's thread. Return to all comments →
Scanner sc = new Scanner(System.in); int arr [] = new int [sc.nextInt()];
for(int i =0;i<arr.length;i++){ arr[i] = sc.nextInt(); } for(int i=0;i<arr.length;i++){ System.out.println(arr[i]); }
Seems like cookies are disabled on this browser, please enable them to open this website
Java 1D Array
You are viewing a single comment's thread. Return to all comments →
Scanner sc = new Scanner(System.in); int arr [] = new int [sc.nextInt()];