← 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?
- A.On every instance
- B.On the class itself, called as ClassName.method()
- C.Only inside the constructor
- 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 →