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
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.
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
Suggested prompts:
Resumir este capítulo
Explicar el código en file
Explicar por qué file no resuelve la tarea
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
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.
Solución
solution.java
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 14
single