I come from operating systems and background of C where the world is simple when code is compiled. Need to deal and understand stack, heap text section etc.
When I started learning Java(I do know about JVM and garbage collector), I got amused by static methods. As per my understanding all the instances of a class do get created in the heap and then do get cleaned. However, for a static method, you don't need an instance of the class.
So, can some one please explain how non static methods and static methods differ in memory model. Do both of them reside in the text section of the memory. Or I am messing up things completely.
Thanks