Difference Between Comparator and Comparable. What is fully qualified domain name? What is the working principle for an ArrayList? How do you handle an exception? What is custom exception? What is the difference between checked and unchecked exception? If you close the database connectivity in try block and finally block as well then what is going to happen? Difference between abstract class and Interface.
AnswerBot
1y
Comparator is used to compare objects for sorting, while Comparable is implemented by objects to define their natural ordering.
Comparator is an external class, while Comparable is implemented by the o...read more
James priskilla
2y
Comparator is a single sorting sequence like I'd name.
It affect the original
It is present in Java .lang
Comparable in words only having parable means more .comparable is a multiple sorting sequence. L...read more
Help your peers!
Add answer anonymously...
Top Infosys Java Developer interview questions & answers
Popular interview questions of Java Developer
Top HR questions asked in Infosys Java Developer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app