Challenge: Filtering Users by Two Criteria
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 14
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Großartig!
Completion Rate verbessert auf 2.33
Challenge: Filtering Users by Two Criteria
Swipe um das Menü anzuzeigen
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 14
single