What is arrays?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

What is arrays??

19th May 2019, 11:38 AM
Kaju Kishmish❤
Kaju Kishmish❤ - avatar
3 Answers
+ 3
an array is a data structure that contains groups of element of similar data types
19th May 2019, 11:46 AM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 2
in java an array is like a collection of variables of the same type which are all accessed by one variable name and an index, like this: //declaration of an int array of length 5 (5 ints can be saved) int[] arr = new int[5]; //setting value of index 0 (start) arr[0] = 1; //getting an value from the array System.out.println(arr[0]); //getting the length of the array System.out.println(arr.length); //can be used in for-loops
19th May 2019, 11:46 AM
Anton Böhler
Anton Böhler - avatar
+ 1
a collection of datas.
19th May 2019, 11:41 AM
你知道規則,我也是
你知道規則,我也是 - avatar