
As you can see I'm trying to run a Java program but I need the command which I can write in terminal to run the code.
I imagine the easiest way would be to press the blue arrow at the top.
If it has to be command line though, try
Javac Main.java
To compile the source to byte code which will give you a Main.class file, then
Java Main
To run it. The oracle website has a quick guide here