0
why this?
please help me.i can not understand this topic. totally confused
8 Respuestas
+ 5
This means you have to use a regular For loop for getting each object in the array so it takes time to give an index and get each object one by one.
But with enhanced type it will use each object in array by itself and you don't need to define it.
e.g.
int[] arr={1,2,3};
for (x=0;x <arr.length;x++) {
System.out.println(arr[x]); }
instead
int[] arr={1,2,3};
for (int t: arr) {
System.out.println(t); }
+ 4
Data structures like arrays are important because there is so much data out there for us to organize and use.
If you go to build a useful application you will often find a ton of available data. The question is how to organize it...smallest value to biggest? statistical mean? This is why learning how to set up arrays matters.
+ 2
u will find the answer in java only ....start from basic
+ 2
arrays are used to store a group of data of similar type. It is useful when large number of data input is needed
+ 1
arrays!!!
+ 1
int[] arr = new int[5]; sets the capacity to 5. which means that the array ( i guess array is something like a group that holds integers or other data of the same type)...
0
read java from basic
0
Mojtaba really good answer....you incorporated abstraction!