Why array is needed?
You might come across a situation where you need to store similar type of values for a large number of data items. For example : to store all student mark , you need declare thousands of variables
In addition, each variable name needs to be unique. To avoid such situations, you can use arrays do store the thousands of student mark.
For example Java Array
To store the marks of 5000 students, you can declare an array, marks, of size 5000 and can store the marks of as many students.
In addition, each variable name needs to be unique. To avoid such situations, you can use arrays do store the thousands of student mark.
For example Java Array
To store the marks of 5000 students, you can declare an array, marks, of size 5000 and can store the marks of as many students.
int marks[] = new int[5000];
For more array information please visit this website...Thank You to visiting our website..
0 comments:
Post a Comment