Skip to content

Your First Java Class

☕ Java 17

The class is the building block of every Java program. Here you'll see what a class is made of — data, behavior and comments — how Java maps classes to files, and how the main method turns a class into a runnable program.

In this series

# Page Reading time
1 Anatomy of a class: fields and methods 3 min
2 Comments, files and the main method 3 min
3 Lab: the StreamingPlatform class 3 min

🎓 OCP 1Z0-829 candidates: exam traps and practice questions (optional)

Prerequisites: How Java Works Under the Hood.

Code: Java17_Part_1_Fundamentals_Core_Syntax on GitHub