Basic Java Programming

Name of file must match name of class
Processing start in main
Printing is done with system.out
Compile with "javac"
Execute with "javac"

File: HelloWorld.java
public class HelloWorld{
       public static void main(String[] args){
               System.out.println("Hello, world.");
       }
}

Compiling
DOS> javac HelloWorld.java

Executing
DOS> java HelloWorld

Hello, world.

learn more visit: http://corewebprogramming.com/


0 comments: