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...
Infosys Java Developer interview questions & answers
A Java Developer was asked 1mo agoQ. What is a profiler?
A Java Developer was asked 1mo agoQ. What is the MVC architecture?
A Java Developer was asked 2mo agoQ. Explain the features of Java 21.
Popular interview questions of Java Developer
A Java Developer was asked 1mo agoQ1. What is a profiler?
A Java Developer was asked 1mo agoQ2. How can you reverse a string using the Stream API?
A Java Developer was asked 1mo agoQ3. What is REST API?
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

