Why do we overload the () operator in the PersonCompare class?
About the Comparator Class
@Souvik_Ghosh hey as person is our made class and you can not compare objects of person directly so you overload that function so that you define that function according to your defination.
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.