Concatenate String array into single string
Categories: Java Java Examples Java Design Pattern
Concatenate String array into single string
package r4r.co.in;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class ConcatenateStringArrayInSingleString {
public static void main(String[] args) {
// Concatenate String array into single string
String[] input=new String[] {"Rajesh","KUmar"};
String str=Stream.of(input).collect(Collectors.joining());
System.out.print(str);
}
}