I have a List<Student>
and String firstName="George"
. I want to extract Student object from List matching with "George"
without iterating list. Is it possible?
May be if some method override required or anything to make it work.
public Class Student {
private String firstName;
private String lastName;
private String class;
// getter, setter methods goes here....
}
Please help me thanks.