AP Computer Science Vocab for Inheritance

  • Mutable object

    • objects whose state CAN change after construction

  • ArrayList

    • an array that can grow and shrink on demand, as you add (or remove) elements to the list

  • IOException

    • Error that occurs when you read from a file

  • final

    • Java keyword that indicates a constant - a variable that cannot be reassigned a new value

  • static

    • used to describe a method or field/attribute that belongs to the class, not the object; does not require the programmer to instantiate an object in order to reference a method or field in the class

  • Wrapper class

    • A class that wraps a primitive type in an object.  These classes contain their corresponding primitive type as an instance variable, but put them into an object for situations where objects are required.

  • Auto-boxing

    • When Java automatically converts to an Object (reference) data type

  • Unboxing

    • When Java automatically converts to a primitive data type

  • Base class - super class - parent class

  • Derived class - Sub class - child class 

  • Single inheritance

    • Every class has 1 and ONLY 1 direct super class

  • Polymorphism

    • The ability of a super class to store a subclass reference

  • Variable hiding

    • When a sub class declares the same variable as its parent class

  • Downcast

    • Casting a superclass to a subclass type

  • Override

    • When a subclass defines the exact same method (in name and parameter list) as a method inherited from a super class

  • Overload

    • Methods that have the same name but different parameter lists

  • Super

    • keyword refers to the super-class, and can be used a to call a parent class constructor or to call a parent class method

  • This

    • keyword in Java refers to whatever object the keyword is found in, this object.

  • Root Class

    • The Java class at the top of the Java class hierarchy

  • constructor chaining

    • use this() to call other constructors in the same class