1String x2 = "hello";
2String newSortedString = "";
3Object[] y = x2.toLowerCase()
4 .chars()
5 .sorted()
6 .mapToObj(i -> (char) i)
7 .toArray();
8
9for (Object o: y) {
10 newSortedString = newSortedString.concat(o.toString());
11}
12
13System.out.println(newSortedString);