array elements retrieve in java