I have an object class named Store which has an attribute "year":
public class Store{
public int year;
...
}
Then, in another class I got a list of Store :
List<Store> stores = getAllStores();
I would like to get from the list the 1st occurrence of store whose year is 2002 without using for loop or while loop. Is it possible?