Advertisement
JeffGrigg

Untitled

Jan 11th, 2021
2,129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.52 KB | None | 0 0
  1. import java.util.stream.Collectors;
  2. import java.util.stream.IntStream;
  3.  
  4. public class A {
  5.     static String hi = "the quick brown fox jumps over the lazy dog";
  6.     static String name = IntStream.range(0, hi.length())
  7.             .parallel()
  8.             .map(l -> hi.charAt(l))
  9.             .filter(s -> s != ' ')
  10.             .mapToObj(c -> Character.toString((char) c))
  11.             .sorted()
  12.             .collect(Collectors.joining());
  13.  
  14.     public static void main(String[] args) {
  15.         System.out.println(name);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement