Typescript String Array Get Method Java