🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Classes, Modules, Map and Set: all 10 questions

Quiz: Classes, Modules, Map and Set · Question 5 of 10

Where does a static method live?

Where does a static method live?

  1. A.On every instance
  2. B.On the class itself, called as ClassName.method()
  3. C.Only inside the constructor
  4. D.In the global scope
Answer & explanation

Correct answer: On the class itself, called as ClassName.method()

Static members belong to the class, so instances don't carry them.

Can you get the rest right without peeking?

Take the timed Quiz: Classes, Modules, Map and Set quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →