E
Size: a a a
E
E
E
E
E
E
TA
E
E
E
TA
I
List<Object[]> arrayList = new ArrayList<>();
arrayList.add(new Object[]{new Object[]{"code", "1212"}, new Object[]{"dsdas", "dasdas"}});
arrayList.add(new Object[]{new Object[]{"code", "12121212"}, new Object[]{"dsdas", "d2121asdas"}});
arrayList.sort((o1, o2) -> {
Object x[] = (Object[]) o1[0];
Object y[] = (Object[]) o2[0];
String s1 = (String) x[1];
String s2 = (String) y[1];
return s2.compareTo(s1);
});
for (Object[] objects : arrayList) {
Object first[] = (Object[]) objects[0];
Object second[] = (Object[]) objects[1];
System.out.println(String.format("%s %s %s %s\n", first[0], first[1], second[0], second[1]));
}
TA
E
E
E
I
E
E
П
