I am wondering how a non static method can modify a static variable. I know that static methods can only access other static methods and static variables. However, is the ot
Static variables are class variable not instance or local variable . that is why we can use static variable in non static method also. and static variables are not per object . static variables have one copy that will be used in entire program.