Back to Writing Classes

Lesson PreviewLesson 7 of 10 in this unit

5.7 Static Variables and Methods

Part of Writing Classes in AP® Computer Science A. Read the opening section, then create a free account for the full interactive lesson, practice, and progress tracking.

The static keyword in Java means that something belongs to the class itself, not to any specific object created from that class. If a field or method is marked as static, you can access it without creating an instance of the class.

Continue the full lesson in Stellar

Create a free account to unlock the remaining sections, checkpoints, course practice, and progress tracking for AP® Computer Science A.