PdfPrep.com

How should you complete the code and call the method?

HOTSPOT

You have the following class definition:

You need to create an extension class and create a new static method in it that converts miles to kilometers and then call the method from another class.

How should you complete the code and call the method? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Box 1: final class UnitConv_MyExtension

Box 2: var km = UnitConv::miToKm(62.1371);

Exit mobile version