Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Factory Product Filtering | Intermediate Operations in Stream API
Stream API
course content

Kursinhalt

Stream API

Stream API

1. Fundamentals and Functional Capabilities of Stream API
4. Practical Applications of Stream API

book
Challenge: Factory Product Filtering

Aufgabe

Swipe to start coding

The factory produces products represented by Product objects, which have the fields id, weight, and quality.

  1. Filter the products to keep only those with a quality of "GOOD" and a weight greater than 10.0.
  2. Extract only the id of the filtered products using a method reference.
  3. Once the result is collected into a list, print the id of the selected products using a method reference to println.

Lösung

java

solution

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 3
toggle bottom row

book
Challenge: Factory Product Filtering

Aufgabe

Swipe to start coding

The factory produces products represented by Product objects, which have the fields id, weight, and quality.

  1. Filter the products to keep only those with a quality of "GOOD" and a weight greater than 10.0.
  2. Extract only the id of the filtered products using a method reference.
  3. Once the result is collected into a list, print the id of the selected products using a method reference to println.

Lösung

java

solution

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 3
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
We're sorry to hear that something went wrong. What happened?
some-alt