The javac command is the Java compiler. It reads your .java source file, checks for syntax errors, and produces a .class file containing bytecode.
Open a terminal, go to the folder where your file lives, and run:
javac HelloWorld.java
If the code has no errors, javac finishes silently and creates HelloWorld.class in the same directory. No news is good news.
If there are errors, javac prints them to the terminal and produces no .class file. You must fix every error before compilation succeeds. There is no partial output.
You can compile multiple files at once: javac File1.java File2.java. The compiler resolves dependencies between them automatically.