Reading · 10 min
Types, classes and main
You are previewing a free lesson. Enrol to save progress and take quizzes.
Every Java program lives in classes, and execution starts in a main method. Variables have fixed types declared up front, so the compiler catches many mistakes before the program runs.
