1.

Which of these methods can be used to check whether the given value is a number or not?(a) isNaN()(b) isNumber()(c) checkNaN()(d) checkNumber()The question was posed to me in an interview for internship.The doubt is from Java.lang in chapter Exploring java.lang & java.io of Java

Answer»

The CORRECT answer is (a) isNaN()

For explanation: isNaN() METHODS returns true if num SPECIFIED is not a number, OTHERWISE it returns false.



Discussion

No Comment Found

Related InterviewSolutions