

Java question
We have the following java code:
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 question: Make changes to test() method so the resulting Map is sorted by it keys. The keys must be sorted by their att1 value.http://www.lead4pass.com