how to take String corresponding to an integer value
Input string with int
One way you can try it out by making two array one for the salary and one for the corresponding names and applying any sorting algorithm an if equal value arises then check for the corresponding names means while sorting do the same with the names array. If salary is not equal then sort on the basis of salary but do the swapping for the both salary and names.