I have a Employee Class with two attributes:- empid and empname.
I have around 1000 Employee Class objects stored in an ArrayList. Now I need to search an Employee Objectin the arraylist based on the Employee ID.
Currently, I am iterating on the arrayList and checking each object's empid property.
Can I write method similar to the contains() of the ArrayList.
Can anyone provide some inputs on this.