🎴 Flashcard Mode

Method Overloading and Method Overriding

Card1 / 13
Mastered0
Review0
QuestionClick to flip

Which of the following statements is/are correct for static method in Java?

A. Static methods are always public.
B. Static method cannot access directly non-static method of the same class.

AnswerClick to flip back
A
Only B
💡 Explanation:

It is not necessary that the static methods are always public. But it is true that static methods cannot access directly non-static method of the same class.

Change Mode