1. 학습
  2. /
  3. 강의
  4. /
  5. Input/Output and Streams in Java

Connected

연습 문제

Processing usernames for display

In a user management system, we need to display usernames stored in a database. Using Streams and .forEach(), we can efficiently process and print each username without using traditional loops.

All the necessary classes from java.util have been imported for you.

지침

100 XP
  • Convert the usernames list into a Stream object.
  • Print each element in the stream using a lambda expression.