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

4th Apr 2020, 12:24 PM
Guntur Darmawan
Guntur Darmawan - avatar
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/
4th Apr 2020, 1:10 PM
Jayakrishna 🇼🇳
0
Thanks Jayakrishna, u are so smart :)
4th Apr 2020, 1:17 PM
Guntur Darmawan
Guntur Darmawan - avatar