PPT Slide
1. A method written for one object type can be applied for another object type.
2. An Example: An array of objects of class type can be converted to an array
of class Objects. For example, an Employee[] array can be passed to a method
which expects an Object array.
3. An Example of “generic programming.
Static int find(Object[], a, Object key)
for (i = 0; i < a.length, i++)
if (a[i].equals(key)) return i;
Employee[] staff = new Employee[10];
Employee harry = new Employee(…..);
int n = find(staff, harry);