結果 : how to validate input in java