sorting - Sort a list i java with two elements (type string and double) in Java -
i writing pension program , stuck. the program looks this: first read in file every line has name of person, age, , first deposit. use method called readfile that. inside method call upon class called class savings which in separate file calculate pension. have following problem: sort names according pensions (highest lowest) don't know how that. here method in readfile class: @suppresswarnings("resource") public void readfile(double rate) { while(scan1.hasnextline()) { string input = scan1.nextline(); scan2 = new scanner(input).usedelimiter("/"); string = scan2.next(); int b = scan2.nextint(); int c = scan2.nextint(); // calculate savings savings s = new savings(); s.totalsavings(a, b, c, rate); // add savings array } } 1st, create class person : class person{ private string name; private int age; private bigdecimal firstdeposit; private bigdecimal pensio...