> Definitely, if there is no specific reason to use anonymous type, it would be > better(easy for use) if getListData() (and other similar methods) returns > List<Object>. > (also anonymous type should be avoided unless it is required. Java's > anonymous type is confusing)
It is required for the setter. If setListData() took a List<Object>, you would not be able to pass a List<Foo> to it. But for the getter, I think returning List<Object> should be fine. Anyone else want to comment? G
