Skip to main content

A couple of tips: When preparing the ListList, ensure you add CustomClassCustomClass objects to the list.

customObjects.add( (CustomClass) object );

customObjects.add( (CustomClass) object ); 

When returning object from your method getObjects()getObjects(), this will return list of CustomClassCustomClass and not list of ObjectsObject.

List objects = getObjects();

List<CustomClass> objects = getObjects(); 

Hope this helps.

A couple of tips: When preparing the List, ensure you add CustomClass objects to the list.

customObjects.add( (CustomClass) object );

When returning object from your method getObjects(), this will return list of CustomClass and not list of Objects.

List objects = getObjects();

Hope this helps.

A couple of tips: When preparing the List, ensure you add CustomClass objects to the list.

customObjects.add( (CustomClass) object ); 

When returning object from your method getObjects(), this will return list of CustomClass and not list of Object.

List<CustomClass> objects = getObjects(); 

Hope this helps.

Source Link

A couple of tips: When preparing the List, ensure you add CustomClass objects to the list.

customObjects.add( (CustomClass) object );

When returning object from your method getObjects(), this will return list of CustomClass and not list of Objects.

List objects = getObjects();

Hope this helps.