Challenge: Filtering Users by Two Criteria
Tehtävä
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.
Ratkaisu
solution.java
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 1. Luku 14
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Suggested prompts:
Tiivistä tämä luku
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 2.33
Challenge: Filtering Users by Two Criteria
Pyyhkäise näyttääksesi valikon
Tehtävä
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.
Ratkaisu
solution.java
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 1. Luku 14
single