Check out example codes for "how to declare array java". It will help you in understanding the concepts better.

Code Example 1

int intArray[];    //declaring array
intArray = new int[20];  // allocating memory to array
int[] intArray = new int[20]; // combining both statements in one

Code Example 2

int[] intArray = new int[]{ 1,2,3,4,5,6,7,8,9,10 }; 
 // Declaring array literal

Code Example 3

string[] abc=new string[]{"hai","hello"}

Learn ReactJs, React Native from