Originally posted by Campbell Ritchie:
Not sure about final and static variable storage. Aren't they on the heap? Maybe somebody else will know.
And scope of a final variable inside a method . . . that method at the most.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
It's a special part of the heap called the "permanent generation".
Why does a full permanent generation trigger Full GC?
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
"I'm not back." - Bill Harding, Twister
Originally posted by Neeraj Dheer:
'Final variable declared in a method has the same scope as other non-final variables in the method, ie, as long as the method (or block in which the variable is declared) is being executed'.
When I declare an anonymous inner class in a method and need the inner class to use a variable declared in the enclosing method, I have to declare it as final. Cant pass a non-final variable.
This leads me to the conclusion that final variables are treated differently than non-final variables.
This link refers to the final variable being stored in a 'more permanent area of memory' which i guess refers to the 'permanant area'.
Is this inference correct or am I missing out on something?
Don't get me started about those stupid light bulbs. |