Different types of Arrays in Java
What is an Array: Array is a data structure which can store collection of elements with same data type.
Why to use Array: In Real time, if you want to store different marks of a student, you no need to declare all the variables to store the marks like, marks1,marks2,marks3,..e.t.c based on their subjects count. But Instead of declaring n variables simply you can declaring an array to store all these values of same datatype.
Why to use Array: In Real time, if you want to store different marks of a student, you no need to declare all the variables to store the marks like, marks1,marks2,marks3,..e.t.c based on their subjects count. But Instead of declaring n variables simply you can declaring an array to store all these values of same datatype.