ECONOMICS

COST ACCOUNTING

TRANSFER PRICING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which comparison data takes precedence if all are available?
A
Internal Comparator
B
External Comparator
C
Profit Comparison
D
Ratio Comparator
Explanation: 

Detailed explanation-1: -A comparator interface is used to order the objects of user-defined classes. A comparator object is capable of comparing two objects of the same class.

Detailed explanation-2: -In Java, Comparable and Comparator are used for sorting collection of objects. java. lang. Comparable is used to sort collection of same types(classes) like List<Student>, List<Employee>, List<Orange>, It means Comparable is like “I can compare myself with another object of same type".

Detailed explanation-3: -The Java Comparator Interface To sort two objects by an order other than their natural order (or to sort objects of classes that do not implement Comparable at all), we have to use the java. util. Comparator interface. The interface defines the method compare(T o1, T o2) to compare the two passed objects.

There is 1 question to complete.