Stack and Heap memory in Java
Posted on 2009-07-11
I am compiling few questions at one place. Can someone please give me answers?
1) I have class A and class B. if I create a instance of B in class A's method, where the memory will be created?
2) where the static methods memory will be created?
3)where the singleton class memory will be created and when will it be destroyed?
4)what is the difference between static class and singleton class. what is the base to choose?