javac <filename>.java ----> Generate a new file with .class
java <filename>

*But it is not the only way to run a Java program.