Skip to content

In this repository, I have added basic examples of Declaring an Array, Initializing an Array, Updating an Array and Deleting Particular Element from array

Notifications You must be signed in to change notification settings

sudarshan-doiphode/Array-CRUD-Example

Repository files navigation

Array-CRUD-Example

In this repository, I have added basic examples of Declaring an Array, Initializing an Array, Updating an Array and Deleting Particular Element from array

What is an array ?

  1. Array is like container which holds group of elements.
  2. Array holds similar type of elements in it.
  3. Size of Array is fixed.

Array Declaration :

ways to Declare an array :

  1. int[] array = new int[5] ---> array declare with fixed size -->Use scanner to take input
  2. int array[] = new int[5] ---> array declare with fixed size
  3. int array[] = {1,2,4,5} ---> array with Initialized elements

Note : you can use[] before or after variable.

Access Array Elements :

  1. To print elements from array we can use loops like for, for each (enhanced for) and while
  2. We can also use Arrays.toString() method to print array in array structure.

About

In this repository, I have added basic examples of Declaring an Array, Initializing an Array, Updating an Array and Deleting Particular Element from array

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages