Tag Archives: prints

Given: (Exhibit) and: (Exhibit) Which code, when inserted on line 10, prints the number of unique localities

Given:and:Which code, when inserted on line 10, prints the number of unique localities from the roster list? A. .map(e > e.getLocality()).collect(Collectors.toSet()).count(); B. map(e > e.getLocality()).count(); C. .map(Employee::getLocality).distinct().count(); D. .filter(Employee::getLocality).distinct().count(); Correct Answer: D

Given: (Exhibit) and: (Exhibit) Which code, when inserted on line 10, prints the number of unique localities

Given:and:Which code, when inserted on line 10, prints the number of unique localities from the roster list? A. .map(Employee::getLocality).distinct().count(); B. .filter(Employee::getLocality).distinct().count(); C. .map(e -> e.getLocality()).collect(Collectors.toSet()).count(); D. map(e -> e.getLocality()).count(); Correct Answer: B

Given: (Exhibit) and: (Exhibit) Which code, when inserted on line 10, prints the number of unique localities

Given:and:Which code, when inserted on line 10, prints the number of unique localities from the roster list? A. map(e > e.getLocality()).count(); B. .filter(Employee::getLocality).distinct().count(); C. .map(Employee::getLocality).distinct().count(); D. .map(e > e.getLocality()).collect(Collectors.toSet()).count(); Correct Answer: B