The following are my notes of reading JVM specifications.
JVM/Compiler
What can we learn from Java HelloWorld?
This is the program every Java programmer knows. It is simple, but a simple start can lead to deep understanding of more complex concepts. In this post I will explore what can be learned from this simple program. Please leave your comments if hello world means more to you.
HelloWorld.java
public class HelloWorld { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Hello World"); } } |
When and how a Java class is loaded and initialized?
In Java, you first write a .java file which is then compiled to .class file during compile time. Java is capable of loading classes at run time. The confusion is what is the difference between “load” and “initialize”. When and how is a Java class loaded and initialized? It can be clearly illustrated by using … Read more