package test.nw;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class StreamTest {
public static void main(String[] args) {
		
//		ArrayList<Integer> l = new ArrayList<Integer>();
//		l.add(11);
//		//l.forEach(i->i=222);
//		l.stream().map(i->i=22).collect(Collectors.toList());
//		System.out.println(l);
		
//		ArrayList<HashMap> l = new ArrayList<HashMap>();
//		HashMap<String,String> m = new HashMap<String,String>();
//		m.put("aaa", "aaa");
//		l.add(m);
//
////		l.stream().map(i->i="bbb").toArray();
////		System.out.println(l.toString());
//		//l.forEach(i->i.put("aaa", "bbb"));
//		
//		l.stream().map(i->i.put("aaa", "bbb"));
//		System.out.println(l);
		
		
		

		
		
		List<String> steam =  List.of("abc","defg","hijk");
		//steam.stream().flatMap(Collection::stream);
		List<String> lls = steam.stream().flatMap(i->{
			return Stream.of(i.split(""));
		}).collect(Collectors.toList());
		lls.forEach(System.out::println);
		
	}
}
