Check out example codes for "work with arrays java". 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

new String[] { "A", "B"}

Code Example 4

int[] array = new int[/*size*/];
// Works for double, char, etc.

Code Example 5

type[] var-name;

Learn ReactJs, React Native from