Challenge: Factory Product Filtering
Tâche
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.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 18
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Génial!
Completion taux amélioré à 2.33
Challenge: Factory Product Filtering
Glissez pour afficher le menu
Tâche
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.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 18
single