Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 368 Bytes

File metadata and controls

8 lines (6 loc) · 368 Bytes

04 — Classes and Objects

Overview

  • Define a class as a blueprint; create objects (instances) from it using the new keyword.
  • Constructors initialize new instances. Default constructor vs custom constructors.
  • this refers to the current instance.

Example: ClassesObjectsExample.java demonstrates defining a class Person, constructors, and using objects.