Create a folder on your computer called "example1" and then download this java file.
Open up the command line and change the current directory until you are in the "example1" folder. You can change folder names by using the cd command. To speed this up you can use a wildcard. Instead of typing in "cd myFolder" you could type in "cd my*".
If you saved the java file in your "my documents" folder then the path will be "users/<YOUR NAME>/My Documents". In linux you can cheat and type in "cd ~" to get to your home folder :)
Once you are in the correct folder you can type in the following command.
javac MyFirstProgram.java
A file called MyFirstProgram.class should appear. If you get any output then you have a error which will mean either -