Java collect list to string with stream api

Java collect list to string with stream api
r‮‬efer to:lautturi.com
/**
 * @author lautturi.com 
 * Java example: java join objects to a string 
 */

import java.util.*;
import java.util.stream.Collectors;

public class Lautturi {
	public static void main(String[] args){

		List<Integer> numbers = Arrays.asList(11,4,2,7,55,16,12,8,13,38);	
		String str = numbers.stream()
		        .map( n -> n.toString() )
		        .collect( Collectors.joining( " " ) );
		System.out.println(str);
	}
}

output:

11 4 2 7 55 16 12 8 13 38
Created Time:2017-09-30 16:36:32  Author:lautturi