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

Code Example 1

String [] names = new String[0];

// or 

int [] ages = {}

Code Example 2

//where n is the length you want the array to be
// for integer array
int[] intArray = new int[n];
// for String array
String[] strArray = new String[n];

Learn ReactJs, React Native from akashmittal.com