Downlaod Code MyWildcardEx.java
We have two classes called CompAEmp and CompBEmp extended Emp class, and we have a generic class called MyEmployeeUtil, where we have utilities to perform employee functions irrespective of which company emp belongs to. This class accepts subclasses of Emp. In case if we want to compare salaries of two employees, how can we do by using MyEmployeeUtil class?
Your Objective is to design Generic class MyEmployeeUtil such that its function isSalaryEqual can compare either objects of the subclass of Emp class.