Preamble: I am aware of using a list or other collections to return a result but then I have to go through the list plucking the results out: see 2nd example
Preambl
Returning an extended Holder seems better than returning a List:
class Holder { int value1; String value2; Holder(int value1, String value2) {} } Holder foobar() { return new Holder(1, "bar"); }