1z0-829 Exam QuestionsBrowse all questions from this exam

1z0-829 Exam - Question 47


Given:

and the code fragment:

What is the result?

Show Answer
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

1 comment
Sign in to comment
dbcd9daOption: D
Jun 10, 2024

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