Inheritance is a fundamental object-oriented programming mechanism in Java that allows a subclass to inherit fields and methods from a superclass, promoting code reuse and establishing an is-a relationship. Subclasses extend superclasses using the extends keyword and can override inherited methods to provide specialized behavior. The super keyword accesses parent constructors and methods, and all classes ultimately inherit from java.lang.Object.
Polymorphism enables a superclass reference to hold a subclass object, with method calls resolved at runtime based on the actual object type (dynamic dispatch). Abstract classes define method signatures that subclasses must implement, while interfaces specify contracts that classes can implement across inheritance hierarchies. Understanding upcasting, downcasting, and the instanceof operator is essential for working with polymorphic code.
Recursion is a technique where a method calls itself to solve problems by breaking them into smaller subproblems. Every recursive method requires a base case (stopping condition) and a recursive case that moves toward the base case. Classic recursive algorithms include factorial, Fibonacci, binary search, and merge sort. This topic covers AP Computer Science A Units 9 and 10, comprising approximately 10-15% of the AP exam.