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
Stay ahead in your career. Get AmbitionBox app
qr-code
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

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter