Think in java problem answer