How to take input in a array in Java? my code is....
String[] array=null;
Scanner sc = new Scanner(System.in);
System.out.println("How many Numbers:");
String r = sc.nextLine();
Scanner sc1 = new Scanner(System.in);
System.out.println("Enter Number:");
for (int m = 0; m < r.length(); m++)
array=sc1.next();
I cant do this.
Please help.