Why will you use Comparator and Comparable interfaces?
java.util.Comparator java.util.Comparator compares some other class’s instances. java.lang.Comparable java.lang.Comparable compares another object with itself. Differentiate between final, finally and finalize. The keyword is final. It is used for declaring a constant It prevents a class from producing subclasses. finally is a code.It always executes when the try block is finished, Unless System.exit() has been called.finalize() is a … Read more