In this repository, I have added basic examples of Declaring an Array, Initializing an Array, Updating an Array and Deleting Particular Element from array
- Array is like container which holds group of elements.
- Array holds similar type of elements in it.
- Size of Array is fixed.
ways to Declare an array :
- int[] array = new int[5] ---> array declare with fixed size -->Use scanner to take input
- int array[] = new int[5] ---> array declare with fixed size
- int array[] = {1,2,4,5} ---> array with Initialized elements
Note : you can use[] before or after variable.
- To print elements from array we can use loops like for, for each (enhanced for) and while
- We can also use Arrays.toString() method to print array in array structure.