The size of an array is set when it's created, and cannot be changed later. When you say int[] a = {}; you are creating an array of length zero.
On the other hand, if you say int[]a = new int[5]; you are creating an array of length five. However, you have not provided any int values for the array's elements, so each of these will initialize to zero.
An array in
Java can hold primitive values or object references. If the array is declared to hold references, then it can hold null references. For example, if you say Object[] a = new Object[5]; you are creating an array of length five. In this case, each of the array's elements will initialize to null.