Challenge: Filtering Users by Two Criteria
Taak
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.
Oplossing
solution.java
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 14
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Awesome!
Completion rate improved to 2.33Awesome!
Completion rate improved to 2.33
Challenge: Filtering Users by Two Criteria
Taak
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.
Oplossing
solution.java
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 14
single
Awesome!
Completion rate improved to 2.33
Challenge: Filtering Users by Two Criteria
Veeg om het menu te tonen
Taak
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.
Oplossing
solution.java
Was alles duidelijk?
Bedankt voor je feedback!