What are the restriction imposed on a static method or a static block of code?

Java Programming Language >   Class, Object and Methods in java >   About Java Tutorial  

Short Question

1118


Answer:

A static method should not refer to instance variables without creating an instance and cannot use "this" operator to refer the instance.


This Particular section is dedicated to Question & Answer only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.