In my driver.java I have the code bellow.
public static void disSortedDepartment()
Vector dept = cpn.getDepartments();
System.out.println("There is no departments in the company");
Iterator iter = dept.iterator();
Department d = (Department) iter.next();
In my department.java I have the following code:
public int compareTo(Object obj)
if(!(obj instanceof Department))
Department d = (Department) obj;
The code seems to be right, but when I try to run it I am getting an exception error.
How do I solve the problem?
You can download the code from:
Your help is kindly appreciated.