Inheritance is similar in Java and C++. Java uses the extends keyword instead of the : token. All inheritance in Java is public inheritance; there is no analog to the C++ features of private and protected inheritance.
In a C++ constructor, you do not call super, but you use the initializer list syntax to construct the superclass. The Manager constructor would look like this in C++:
// C++ Manager::Manager(String name, double salary, int year, int month, int day) : Employee(name, salary, year, month, day) { bonus = 0;}
Inheritance Hierarchies
The collection of all classes extending a common superclass is called an inheritance hierarchy.
In C++, a class can have multiple superclasses. Java does not support multiple inheritance. For ways to recover much of the functionality of multiple inheritance, see Section 6.1, “Interfaces,” on p. 296.