1实体类:
package com.pengjunlee.hive.controller;
public class Result {
private String name;
private String value;
private int num;
public Result(String name, String value, int num) {
super();
this.value = value;
this.name = name;
this.num = num;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
}
2list对比
package com.pengjunlee.hive.lianxi;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import com.alibaba.fastjson.JSONObject;
import com.pengjunlee.hive.controller.Result;
public class lianxi {
public static void