Which of the following options is true?
i. Float and Double classes have only one non-static method i.e. Infinite() method.
ii. Float and Double classes have one static method i.e. Infinite() method, and one non-static method i.e. Infinite() method.
iii. Float and Double classes have only one static method is Infinite() method.
iv. Float and Double classes does not have any Infinite() method.
B
Correct answer
Explanation
This answer is correct. Float and Double classes has one static isInfinite() method and a non-static method is Infinite() method.The non-static method takes float number when invoked from Float class and will return true if the invoking object contains an infinite value.The non-static method takes double number when invoked from Double class and will return true if the invoking object contains an infinite value whereas static method will return true if the number specified is an infinte value in both the classes else return false.