+ 1

Can someone help me to state the different steps on how to make an array?

Array in java numerate steps

9th May 2020, 4:18 PM
Yorokobi💜
Yorokobi💜 - avatar
2 Réponses
+ 4
Steps : 1) Imagine a name 2) Imagine what you need to store in the array 3) Write code to make the array In action : 1) Let's imagine the name is 'numbers' 2) Let's imagine we need to store 1 to 10. 3) Let's write the code : int[ ] numbers = {1,2,3,4,5,6,7,8,9,10}; We've successfully made an array :))
9th May 2020, 4:22 PM
Arb Rahim Badsa
Arb Rahim Badsa - avatar
+ 3
//fill instantly... int array = {0,1,2,3,4,5}; _______________________ //fill using loop... int array = new int[4] for(int i = 0; i < array.length; i++) array[i] = I; ___________________________ //Fill one by one... int array = new int [4]; ayray[0] = 0; ayray[1] = 1; ayray[2] = 2; ayray[3] = 3;
9th May 2020, 5:25 PM
KingDaniel2004
KingDaniel2004 - avatar