MyClass.java
 

public class MyClass {
  public static void main(String[] args) {
    System.out.println("Hello World");
  }
}

Result:
C:\Users\Name\java MyClass
Hello World