When a class A is loaded an object is created representing the class. This object is an instance of the class Class. From this object you can obtain other objects representing the variables (both static fields and member fields) of the class A. All these objects are held in the heap. The only variables held on the stack are local variables of a method.
You can read the
Java API for class java.lang.Class and read the Java Virtual Machine Specification for detailed information.
[ January 14, 2007: Message edited by: Barry Gaunt ]