0

I have a Java class

public class ListData extends ArrayList<Object> implements Serializable {

    private static final long serialVersionUID = 1L;

    public ListData() {
        super();
    }

    public ListData(List<Object> list) {
        super(list);
    }

}

In another class I have following code

List<Map<String, Object>> mapList = toMapList(objects, keys); // Some function returning List<Map>
ListData listData = new ListData(mapList);

The Eclipse showing error as

The constructor ListData(List<Map<String,Object>>) is undefined.

Why it's not accepting as List<Object>? and how to solve?

Thanks.

Shayan Ghosh
  • 882
  • 6
  • 14
iCode
  • 8,892
  • 21
  • 57
  • 91

0 Answers0