Can we declare a static variable inside a method? Ans. Static varaibles are class level variables and they can't be declared inside a method. If declared, the class will not compile.
Download the Study24x7 App, so you can connect and collaborate.