SCJP
Visit my download page
are nothing but instance variables which stays in heap.class variables
, these variables are like local variables as good as declared in class methods, which stays in stack as they are specific to the methods/blocks for that thread.variables declared inside initializer blocks
are also treated as local variables and stays in Non-Heap Memory.variables declared in static initializer block
--
Sandeep
Nayanish Patil wrote:What do you mean by 'implementation detail'?.
I just want to know where the respective variables related to my question, live. i.e. on STACK or on HEAP.
...
But, their is no information specified about, where the 'class variables' & 'variables
declared inside initializer blocks' live. That's why i posted this question here.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Class variables are not instance variables.Sandeep Gabhale wrote:Nayanish,
are nothing but instance variables which stays in heap.class variables
Correct me if i'm wrong for the below statement . . .
You didn't tell me he was so big. Unlike this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|