Java Copy Array And String Manipulations In Java