
6 • Java Programming
Examples:
1. In the example given below, we have a vehicle class
at the top in hierarchy. All the common features of a
vehicle can be put in this class. From this, we can derive
a new class, i.e., two wheeler, which contains features
specifi c to two-wheeler vehicles only.
2. As another example we can take an engineering college
as the top class and its various departments such
as computer, electronics, electrical , etc., as the sub-
classes. The u niversity to which the engineering college
is affi liated may be its parent class.
7. Dynamic binding : Binding means linking. It involves linking of function defi ...