java start program code example
Example 1: compile java
// compile
> javac myCode.java
// run
> java myCode
Example 2: how to start a java program
class A {
public static void main(String args[]){
System.out.println("Hello World");
}
}
Example 3: how to run a java file in terminal
javac FirstJavaProgram.java