Challenge: Factory Product Filtering
Uppgift
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
qualityof"GOOD"and aweightgreater than 10.0. - Extract only the
idof the filtered products using a method reference. - Once the result is collected into a list, print the
idof the selected products using a method reference toprintln.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 18
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Fantastiskt!
Completion betyg förbättrat till 2.33
Challenge: Factory Product Filtering
Svep för att visa menyn
Uppgift
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
qualityof"GOOD"and aweightgreater than 10.0. - Extract only the
idof the filtered products using a method reference. - Once the result is collected into a list, print the
idof the selected products using a method reference toprintln.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 18
single