class Simple{
public static void main(String args[]){
System.out.println("Hello World");
}
}
Write this to compile on terminal where Simple.java is the file name javac Simple.java then to execute write java Simple. When you compile the code .class file is created which is the bytecode and then you run that class.Now lets understand every single syntax in this program.If this error shows up while compiling the code this means that the path is not set correctly beacuse of that DOS is not able to identify javac.