How to read data from scanner to an array in java?
Answers
Answered by
0
It is done in such a way
Scanner sc=new Scanner (System.in);
int a[]=new int[10];
for (int i=0;i<a.length;i++)
{
a[i]= sc.nextInt();
}
Now you got@
for more java doubts ,follow me
Similar questions