Only ever used IDEs for developing in Java and wanted to learn how to use JShell but I'm getting the following error for a basic hello world example and anything else I try. Don't understand where the ';' error is coming from.
|javac HelloWorld.java
| Error:
| ';' expected
| javac HelloWorld.java;
code for HelloWorld.java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
You don't compile in JShell, you can add the main method and then call it