Oracle Massive Open Online Course: Java SE 8 Lambdas and Streams
There are five exercises for this week’s homework: Exercise 1: Create a string that consists of the first letter of each word in the list of Strings provided. HINT: Use a StringBuilder to construct the result.
Exercise 2: Remove the words that have odd length s from the list. HINT: Use one of the new methods from JDK 8.
Exercise 3: Replace every word in the list with its upper case equivalent. HINT: Again, use one of the new methods from JDK 8.
Exercise 4: Convert every key-value pair of the map into a string and append them all into a single string, in iteration order. HINT: Again, use a StringBuilder to construct the result String. Use one of the new JDK 8 methods for Map.
Exercise 5: Create a new thread that prints the numbers from the list. HINT: This is a straightforward Lambda expression.