Challenge: Factory Product Filtering
Oppgave
Swipe to start coding
The factory produces products represented by Product
objects, which have the fields id
, weight
, and quality
.
- Filter the products to keep only those with a
quality
of"GOOD"
and aweight
greater than 10.0. - Extract only the
id
of the filtered products using a method reference. - Once the result is collected into a list, print the
id
of the selected products using a method reference toprintln
.
Løsning
solution.java
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 3
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 2.33Awesome!
Completion rate improved to 2.33
Challenge: Factory Product Filtering
Oppgave
Swipe to start coding
The factory produces products represented by Product
objects, which have the fields id
, weight
, and quality
.
- Filter the products to keep only those with a
quality
of"GOOD"
and aweight
greater than 10.0. - Extract only the
id
of the filtered products using a method reference. - Once the result is collected into a list, print the
id
of the selected products using a method reference toprintln
.
Løsning
solution.java
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 3
single
Awesome!
Completion rate improved to 2.33
Challenge: Factory Product Filtering
Sveip for å vise menyen
Oppgave
Swipe to start coding
The factory produces products represented by Product
objects, which have the fields id
, weight
, and quality
.
- Filter the products to keep only those with a
quality
of"GOOD"
and aweight
greater than 10.0. - Extract only the
id
of the filtered products using a method reference. - Once the result is collected into a list, print the
id
of the selected products using a method reference toprintln
.
Løsning
solution.java
Alt var klart?
Takk for tilbakemeldingene dine!