AP® Computer Science A glossary
Object class
Also called: Object
Course: AP® Computer Science A Shows up in: Unit 1: Using Objects and Methods
The class at the top of every Java class hierarchy: all classes are subclasses of Object.
Appears in the course and exam description (CED): 1.12.A.31.15.A.5
Because every class is a subclass of Object, every object can use the behaviors Object defines, such as toString.
public class Coin
{
}
// in main
Coin c = new Coin();
System.out.println(c.equals(c));
Output:
true Learn it properly, with a checkpoint 1.12 Objects: Instances of Classes