Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
A public class is one that can be accessed and used by any other class or program. It serves as the blueprint for creating objects and contains variables and methods.
Related terms
private class: This refers to a class that can only be accessed within its own file. Other classes cannot directly access its variables or methods.