結果 : how to create a scanner method in java