Java Study Guide: Classes and Objects
A property of an object. Each object is distinct.
Current values of an object’s attributes at a given time.
How an object acts or interacts with other objects defined by the object’s methods.
Built-in data type. 8 types: byte, short, int, long, float, double, boolean, char.
Byte, short, int, long, float, double, boolean, char.
What are the 8 primitive types?
User- defined type. Think of it as cookie cutter from which objects are created or a blueprint from which objects are built.
Instance of a class.
Create an object. Use the new keyword to _______ objects.
Also known as data hiding. You keep the implementation details of a class hidden from the user by making attributes private and provide access to data through public methods.
Part of the Java system that reclaims lost objects so that the memory can be reused.
A special method that initializes the state of new objects as they are created.
Java keyword used to create objects.
Methods that access an object’s data without changing the data.
Methods that change the state of an object by modifying at least one of its attributes.
Refers to the current object. Common use of this keyword is to resolve naming conflict with variables and attributes.
public name (conditions to create an object)
How do you write a constructor?
All the other types are reference types: they reference objects.