What is static variable? What is static method?

This question is related to Oracle Interview

Showing Answers 1 - 1 of 1 Answers

Sanjana Shetty

  • Feb 7th, 2007
 

There is only one copy of a static variable to serve all objects of the class, not one per object. It is allocated when the class is first loaded. Staic methods are class methods. All static methods are automatically final. static methods work without any of this object. static methods are limited to calling other static methods in the class and to using only static variables. They can call instance methods only if they use their own object references -- not rely on this .

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions