0
How to declare array in java and assignment operator expression? Help :)
I want to create an array variable, integer data type, and can use it for input containers, for example array [3], so I can input 3 times
2 Answers
+ 1
Scanner in=new Scanner(System.in);
int arr[] =new int[3];
for(int i=0;i<3;i++)
arr[i]=in.nextInt() ;
Read these two and combine..
https://www.sololearn.com/learn/Java/2148/
https://www.sololearn.com/learn/Java/2220/
0
Thanks Jayakrishna, u are so smart :)