java - How to get the top 10 highest values Json -
so wanted make list of top 10 donators java application , going use json store data that.
so json looks this:
{ "donators": { "donator1":5, "donator2":13, "donator3":8 } }
now wondering if there sort of efficient way in how store variable name , variable value in list , sort them collections method display top 10 best donators.
would use hasmap this? must dynamic, need able increment values of variables.
help appreciated.
fixed creating donator class 2 fields, jb nizet
Comments
Post a Comment