Challenge: Filtering Users by Two Criteria
Tâche
Swipe to start coding
Filter the users who are over 18 years old and have an "Active" status, then print them to the screen.
- Create a
BiPredicateto check ifageis greater than 18 andstatusis "Active". - Inside
forEach(), use theifstatement to evaluate the user based on theBiPredicate. - If the user satisfies the condition, print the user to the console.
Solution
solution.java
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 14
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
Awesome!
Completion rate improved to 2.33
Challenge: Filtering Users by Two Criteria
Glissez pour afficher le menu
Tâche
Swipe to start coding
Filter the users who are over 18 years old and have an "Active" status, then print them to the screen.
- Create a
BiPredicateto check ifageis greater than 18 andstatusis "Active". - Inside
forEach(), use theifstatement to evaluate the user based on theBiPredicate. - If the user satisfies the condition, print the user to the console.
Solution
solution.java
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 14
single