+ 3

Can anyone Explain me the concept of arrays in simple ??

31st May 2018, 5:01 PM
Shehroz Irfan
Shehroz Irfan - avatar
2 ответов
+ 4
It is just a series of variables combined together under one name, typically they're related to one another in some form. You access the individual variables within the array by referencing the array's name and specify its index. EXAMPLE: String[] cars = new String[3]; cars[0] = "Honda"; cars[1] = "Ford"; cars[2] = "Kia"; System.out.println(cars[1]); // output is Ford System.out.println(cars[0]); // output is Honda for(String car : cars){ System.out.println(car + " "); } // output is Honda Ford Kia You didn't say what language you're working with, but the concept is pretty much the same between them, though the syntax is different between some of them.
31st May 2018, 5:10 PM
Fata1 Err0r
Fata1 Err0r - avatar
0
[DUPLICATE QUESTION]
31st May 2018, 5:11 PM
***
*** - avatar