Chapter 4 Flashcards
(11 cards)
Class declaration that signals that the class is usable by all client programs.
public
Methods and variables that can only be accessed by methods of that class are
private
How to call constants in a program
static final (constants)
Method that creates an object of a class
Constructor
- always same name as class
- no return type
Methods that access a class object without altering the object
Accessor methods
Method that changes the state of an object by modifying at least on instance variable
Mutator methods
Void
Two or more methods in the same class that have the same name but different parameter lists
Overloaded methods
Ex constructors or think product
Keyword used as an implicit parameter for the method
this
Ex
this.name = name;
Parameters used in the method header
Formal parameters
Parameters used when using objects
Actual parameters
Blueprint for an object
A class