結果 : how to avoid type casting in java