Basic Pattern Question In Java