Can We Declare Static Variables inside a Method or Constructor

Most of the programmer says "YES". But we can't declare Static variable inside the method or constructor. Because static variables are class level variables. Static means one per class as per OOPS rules and method level variables scope is within the method. 

Image1.jpg

Image2.jpg

Ebook Download
View all
Learn
View all