I want to add y to the x:
x.put("y", (Comparable) y);
y is defined as:
ArrayList<LinkedHashMap<String, Comparable>> y = new ArrayList<LinkedHashMap<String, Comparable>>();
Output example of
y =[{c=32,a=1, b=2 }, {c=33,a=4, b=5 }]
x is defined as:
LinkedHashMap<String, Comparable> x = new LinkedHashMap<String, Comparable>();
I am getting this error: java.util.ArrayList cannot be cast to java.lang.Comparable where i am trying to : x.put("y", (Comparable) y); and if I remove the comparable it shows that error exist in the eclipse. Any suggestion?
/Elham