memory management - Where does the Java store the final member and static member? -


i know static method , non-static method of class store in method area.
in doubt java stores final variable(constant) members , static variable members of object.


for example,

class a{      private final int = 1;      private static int b = 2;      private static final int c = 3;      //other codes... } 

i wonder java store a,b,c in memory. heap,stack,or method area?


======update=====
hey,thanks help.and please allow me share link components of jvm:http://www.artima.com/insidejvm/ed2/jvm2.html

inside java virtual machine instance, information loaded types stored in logical area of memory called method area.memory class (static) variables declared in class taken method area.

all instance variables stored in heap area, including final members.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -