[java] Adding values to an array in java