The Java Virtual Machine has a method area that is shared among all Java Virtual
Machine threads. The method area is analogous(相似的) to the storage area for compiled
code of a conventional language or analogous to the “text” segment in an operating
system process. It stores per-class structures such as the run-time constant pool,
field and method data, and the code for methods and constructors, including
the special methods (§2.9) used in class and instance initialization and interface
initialization.
The method area is created on virtual machine start-up. Although the method area
is logically part of the heap, simple implementations may choose not to either
garbage collect or compact it. This specification does not mandate the location of
the method area or the policies used to manage compiled code. The method area
may be of a fixed size or may be expanded as required by the computation and may
