April 2002
Intermediate to advanced
1024 pages
23h 26m
English
Note
To do a decent comparison between the CLR and a JVM, it makes sense to install Java. The discussions in this Appendix assume use of Java 1.4 of Java and the associated PDK from Sun (http://developer.java.sun.com/developer/index.jshtml).
Look at Listing D.1, which shows the simplest of Java programs.
// To compile and run
// javac -classpath . helloworld.java
// java HelloWorld
// (case is important)
class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello World from Java!");
}
}
|
Compiling this program produces a class file called HelloWorld.class. To run the program, type java HelloWorld. With Java, you specify a class name to run. Running this program ...
Read now
Unlock full access