+ 3
Difference between using and not using 'static' keyword in java?
does it saves memory?
2 Respuestas
+ 3
Static Methods can access static variables without any objects, however non-static methods and non-static variables can only be accessed using objects.Static methods can be accessed directly in static and non-static methods. For example the static public static void main() method can access the other static methods directly. Also a non-static regular method can access static methods directly.