MCQs
i.isNaN() method returns returns true if i is not a number and false when i is a number.
Here false is returned because i is a number i:e 257.5.
Output:
$ javac Output.java
$ java Output
false
long longValue() is used to obtain value of invoking object as a long.
valueOf() returns true if the specified string contains "true" in lower or uppercase
and false otherwise.
Output:
$ javac Output.java
$ java Output
true
Character.MAX_VALUE returns the largest character value, which is of character '?'.
Output:
$ javac Output.java
$ java Output
?
The super class of Double class defines a constant MAX_VALUE above which a
number is considered to be infinity. MAX_VALUE is 1.7976931348623157E308.
Output:
$ javac Output.java
$ java Output
1.7976931348623157E308
None.
isDefined() returns true if ch is defined by Unicode. Otherwise, it returns false.
Void class has only one field - TYPE, ehich holds a reference to the Class object
for type void. We do not create instance of this class.
compareTo() methods compare the specified object to be double, if it is not then
ClassCastException is thrown.
compareTo() methods compare the specified object to be double, if it is not then
ClassCastException is thrown.