🎴 Flashcard Mode

Java Core Programming

Card1 / 27
Mastered0
Review0
QuestionClick to flip

Which of the following statements regarding Math class is/are true?

i. Math class cannot be instantiated and all the methods are static.
ii. All the methods are non-static in Math class and so, the Math class can be instantiated.
iii. Constructor is always public in Math class.
iv. Constructor is always private in Math class.<o:p>

AnswerClick to flip back
A
i. and iv. are true
💡 Explanation:

This answer is correct. Math class has all the methods as static and it can be called without instantiating. Also, the constructor defined for Math class is declared as private.

Change Mode