I have a class called Employee which has employeeName and employeeId as its member variables.I am creating new Employee objects and then adding it
employeeName
employeeId
The way you are comparing string is wrong. See How to compare 2 Strings in Java
(Employee)emp).employeeName== this.employeeName
should be
(Employee)emp).employeeName.equals(this.employeeName)