array of nulls java code example Example: java empty array String [] names = new String[0]; // or int [] ages = {}