We have the following java code:
[java]
public class MyObj{
public String att1; 642-374
public Integer att2;
public Date att3;
}
public Map<MyObj, Integer> test(){
Map<MyObj, Integer> map = new HashMap<MyKey, Integer>();
List<MyObj> myObjList = service.getMyObjList();
for (MyObj obj : myObjList){
map.put(obj, obj.att2);
}
return map;
}
[/java]
Java question: Make changes to test() method so the resulting Map is sorted by it keys. The keys must be sorted by their att1 value.https://www.lead4pass.com