.class Java files
Are the Java code usually packaged inside jar files and used in Applets and Java Applications.
You can follow the tutorial from Sun: The Java Tutorial on how to make java applications.
.class files are bytecodes, and you can partially decompile them with a tool called mocha, also on macOS. This require some use of the command line.