fork download
  1. import java.util.stream.Collectors;
  2. import java.util.stream.Stream;
  3.  
  4. class Ideone {
  5. public static void main(String[] args) {
  6. String[] params = {"v1", "v2"};
  7. StringBuilder sb = new StringBuilder();
  8. Stream.of(params).map(sb::append).collect(Collectors.toList());
  9. System.out.println(sb.toString());
  10. }
  11. }
Success #stdin #stdout 0.07s 34152KB
stdin
Standard input is empty
stdout
v1v2