Check out example codes for "java create an array". It will help you in understanding the concepts better.

Code Example 1

type var-name[];
type[] var-name;

Code Example 2

int[] intArray = new int[20];
String[] cars = {"Volvo", "BMW", "Ford", "Mazda"};

Code Example 3

int[] age = new int[5];

Code Example 4

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

Learn ReactJs, React Native from