Challenge: Filtering Users by Two Criteria
Oppgave
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.
Løsning
solution.java
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 14
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 2.33Awesome!
Completion rate improved to 2.33
Challenge: Filtering Users by Two Criteria
Oppgave
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.
Løsning
solution.java
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 14
single
Awesome!
Completion rate improved to 2.33
Challenge: Filtering Users by Two Criteria
Sveip for å vise menyen
Oppgave
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.
Løsning
solution.java
Alt var klart?
Takk for tilbakemeldingene dine!