• If we want to store 1000 records in a program, we cannot write 1000 variables in the program because it is a headache writing so much and secondly the readability of the program goes down. We have to use array in this case.
  • We can create an array of primitive and primitive data type and objects as well.
  • We need to know the size of data in advance to use array list.
  • Always best to use Arrays if the size of data is fixed and known in advance i.e compile time.

Limitations of Array :

  • Arrays are fixed in size.
  • Arrays can hold only homogeneous data elements.
  • Arrays are not implemented based on standard data structure hence ready-made method support is not present.

Leave a Comment