Challenge: Filtering Corporate Email Addresses
Task
Swipe to start coding
You have a list of employee email addresses, and you need to keep only the corporate emails (those ending with @company.com).
- Implement a
Predicateto filter corporate emails that end with@company.com. - Pass the correct parameters to the
filterEmailsmethod. - In the
filterEmailsmethod, iterate through all email addresses using afor-eachloop. - Apply the
Predicatein theifcondition. - Add the matching emails to the new list
result.
Solution
solution.java
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 5
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain this in simpler terms?
What are some examples related to this topic?
Where can I learn more about this?
Awesome!
Completion rate improved to 2.33
Challenge: Filtering Corporate Email Addresses
Swipe to show menu
Task
Swipe to start coding
You have a list of employee email addresses, and you need to keep only the corporate emails (those ending with @company.com).
- Implement a
Predicateto filter corporate emails that end with@company.com. - Pass the correct parameters to the
filterEmailsmethod. - In the
filterEmailsmethod, iterate through all email addresses using afor-eachloop. - Apply the
Predicatein theifcondition. - Add the matching emails to the new list
result.
Solution
solution.java
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 5
single