Last active
May 1, 2019 07:16
-
-
Save kunals201/f979cb894ad3d43ed3c80d0a6ca30f39 to your computer and use it in GitHub Desktop.
Need of apache commons for collections
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.knoldus; | |
import java.util.ArrayList; | |
import java.util.stream.Collectors; | |
public class LambdaEx { | |
public static void main(String[] args) { | |
ArrayList<String> list1 = null; | |
list1.stream().map(elem -> elem + "Knoldus").collect(Collectors.toList()); | |
list1.forEach(System.out::println); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment