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
In this context, "Employee" refers to a class that represents an employee object. It includes variables like name and salary, as well as methods like printEmployeeInfo() and giveRaise().
Related terms
object-oriented programming (OOP): OOP is a programming paradigm where code is organized around objects/instances of classes like Employee. It promotes reusability and modularity.
instance variable: An instance variable is a variable defined within a class but outside any method. Each instance of the class has its own copy of instance variables.
constructor: A constructor is a special method used for initializing objects. The Employee(String empName, int empSalary) in this code snippet is an example of a constructor.