Challenge: Filtering Users by Two Criteria
Tarea
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
BiPredicate
to check ifage
is greater than 18 andstatus
is "Active". - Inside
forEach()
, use theif
statement to evaluate the user based on theBiPredicate
. - If the user satisfies the condition, print the user to the console.
Solución
solution.java
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 14
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 2.33
Challenge: Filtering Users by Two Criteria
Desliza para mostrar el menú
Tarea
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
BiPredicate
to check ifage
is greater than 18 andstatus
is "Active". - Inside
forEach()
, use theif
statement to evaluate the user based on theBiPredicate
. - If the user satisfies the condition, print the user to the console.
Solución
solution.java
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Awesome!
Completion rate improved to 2.33Sección 1. Capítulo 14
single