Not able to get the approach
Not able to get the approach
this problem is very simple using interface
just implement the comparable interface and write the compareTo method to sort according to given condition
https://ide.codingblocks.com/s/234889 you can take help of this code and understand the approach.
You need to create a separate class for Salary inputs and define a constructor to take input and compare function to remove redundant values.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.