[Solved] how to search in a list in java?


Try this :
In case the

if(listOne.contains(object))
            return listOne;

The list.contains() uses equals. so, if list.contains() does not give you the expected result, you should be overriding the equals method.

solved how to search in a list in java?