Java Coding Question With Array Behavioral Care