Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.stream.Collectors;
- import java.util.stream.IntStream;
- public class A {
- static String hi = "the quick brown fox jumps over the lazy dog";
- static String name = IntStream.range(0, hi.length())
- .parallel()
- .map(l -> hi.charAt(l))
- .filter(s -> s != ' ')
- .mapToObj(c -> Character.toString((char) c))
- .sorted()
- .collect(Collectors.joining());
- public static void main(String[] args) {
- System.out.println(name);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement