What will happen when two objects with MAP method defined will be compared?

Options
- Oracle first calls the MAP function for each object and then compare the two results
- Oracle only calls the MAP function for first object and then compare that result with second object
- Oracle first calls the MAP function for first object and pass the result of one as a parameter for second object
- MAP method will be called for only one of the objects


CORRECT ANSWER : Oracle first calls the MAP function for each object and then compare the two results

Discussion Board
MAP method

Two special kinds of member methods can be defined for comparing the objects: map methods and order methods. A map method is an optional kind of method that provides a basis for comparing objects by mapping object instances to one of the scalar types DATE, NUMBER, VARCHAR2 or to an ANSI SQL type such as CHARACTER or REAL. With a map method, you can order any number of objects by calling each object's map method once to map that object to a position on the axis used for the comparison, such as a number or date.

Prajakta Pandit 02-22-2017 11:55 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement