This is a simple "Welcome world" done with Java programming language.
This is the source code of the program:
public class WelcomeWorld {
public static void main(String[] args) {
System.out.println("Welcome world!");
}
}Notice that System.out.println("Welcome world!"); shows the string "Welcome world!" on the screen.
To compile the "Welcome World" program, type the following:
javac WelcomeWorld.javaTo configure classpath to run program, type this: FOR WINDOWS
set classpath=%classpath%;%JAVA_HOME%FOR LINUX
export CLASSPATH=$CLASSPATH;$JAVA_HOMETo execute the program, type this:
java WelcomeWorld