Classes

Basic Class

Classes are what contains all your executable code in Java. We will make HelloWorld as a beginning example of how classes work.

The class name HelloWorld should match the name of the file (e.g. HelloWorld.java). For any program that you want to run, a main class is necessary. All main methods are written as seen above: