I am trying to add two \'Employee\' objects to a TreeSet:
Set s = new TreeSet(); s.add(new Employee(1001)); s.add(new Employe
So implement Comparable interface to Employee object as it`s needed when you are using TreeSet, because TreeSet wants to keep elements sorted.