This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
No, classes aren't loaded at compile time. The compiler simply turns your Java source code into Java bytecode, to be run at some future time. At that future time, when you run the program, that's when classes are loaded.
You can't create an object of class X until you have loaded class X. Does that answer your question about the phases?
you can find a lot of information here.
Compilation generates only the .class files (bytecodes). The loading starts when we invoke java command, and then an object/instance of java.lang.Class type is created into which the static members of the class that you execute (java ClassName) get memory, and from thereon, the heap memory, the stacks area (where methods exeute) are created depending upon your program logic and thus follows the processing of your coding logic.
The biggest gamble will be to ask a question whose answer you know in that it will challenge your theory | www.TechAspire.blogspot.in
I Think all the classes in The inheritence tree gets loaded .after saying Java Lion suppose jvm encounters Lion lion=new Lion() ,constructor chaining starts ,at that time it needs super class already loaded .this is my understanding,please correct me if m wrong.