Question OOP-CLS-0014
MediumCan a static method access instance (non-static) members directly?
- A.
Only in Python
- B.
Only if it is private
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Classes and Objects question
Can a static method access instance (non-static) members directly?
Only in Python
Only if it is private
Sign up free to see the answer and a step-by-step explanation.
No, because it isn't called on any particular object
Yes, always