interview questions on scanner class in java