Exam 1z0-829 All QuestionsBrowse all questions from this exam
Question 47

Given:

and the code fragment:

What is the result?

    Correct Answer: D

    The program creates a list of ElectricProduct objects and performs operations to calculate statistics and concatenate names. The DoubleSummaryStatistics sts contains the highest price among ElectricProduct objects, which is 300.0 from the Fan. The string sl concatenates the names of all Product objects in the list, which are CellPhone, ToyCar, Motor, and Fan. Therefore, the correct result is 300.0 and CellPhone,ToyCar,Motor,Fan.

Discussion
dbcd9daOption: D

D is correct 300.0 CellPhone,ToyCar,Motor,Fan Checked in IJ