Get Started
905

Q: Why static methods cannot access non static variables or methods?

  • उत्तर देखें
  • Workspace

Answer :
Explanation :

A static method cannot access non static variables or methods because static methods doesnt need the object to be accessed. So if a static method has non static variables or non static methods which has instantiated variables they will no be intialized since the object is not created and this could result in an error.

सबसे विस्तृत एग्जाम तैयारी प्लेटफार्म

Examsbook Prep ऐप आज ही प्राप्त करें