Heap:
is a single area where JVM allocates memory for -Objects, including method code
, static variables & instance variables.
Stack: Stack is created for each individual thread, JVM allocates memory for - local variables & arguments (values passed to method variables)
@ interface - all values in interface are constants i.e final static, so it's stored on Heap only.
Stack: Stack is created for each individual thread, JVM allocates memory for - local variables & arguments (values passed to method variables)
@ interface - all values in interface are constants i.e final static, so it's stored on Heap only.
No comments:
Post a Comment