Sorry, I pushed submit instead of preview by mistake, so you only got half an answer.
Once you get to that directory, use single file execution (Java11+ only, I think). Edit and save an
XXX.java file with any number of classes in, but the first class written has to have the
main() method. At this point, a “
Hello, World!” would do nicely. Execute it with
java XXX.java. If you get error messages with Java® compiler errors in, assume it is working and will execute correctly whenever you correct those errors. If you get a “Hello, World!” to execute correctly, you have proved you can write and load and compile code, and that the installation is working properly. Even without Dr. Java.
Confirming a correct installation is the only use for a “Hello, World!”; it isn't an example of great programming style!