Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Filtering Corporate Email Addresses | Fundamentals and Functional Capabilities of Stream API
Stream API
course content

Contenu du cours

Stream API

Stream API

1. Fundamentals and Functional Capabilities of Stream API
4. Practical Applications of Stream API

book
Challenge: Filtering Corporate Email Addresses

Tâche

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).

  1. Implement a Predicate to filter corporate emails that end with @company.com.
  2. Pass the correct parameters to the filterEmails method.
  3. In the filterEmails method, iterate through all email addresses using a for-each loop.
  4. Apply the Predicate in the if condition.
  5. Add the matching emails to the new list result.

Solution

java

solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 5
toggle bottom row

book
Challenge: Filtering Corporate Email Addresses

Tâche

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).

  1. Implement a Predicate to filter corporate emails that end with @company.com.
  2. Pass the correct parameters to the filterEmails method.
  3. In the filterEmails method, iterate through all email addresses using a for-each loop.
  4. Apply the Predicate in the if condition.
  5. Add the matching emails to the new list result.

Solution

java

solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 5
Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
We're sorry to hear that something went wrong. What happened?
some-alt