Advertisement
Guest User

Untitled

a guest
Jan 27th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import com.sun.source.util.Trees;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.IOException;
  5. import java.io.InputStreamReader;
  6. import java.util.*;
  7.  
  8. public class asf {
  9.  
  10. public static void main(String[] args) throws IOException {
  11. BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
  12.  
  13. TreeSet<String> text = new TreeSet<>();
  14.  
  15. String string = reader.readLine();
  16.  
  17.  
  18. for (char characterOfWord : string.toCharArray())
  19. text.add(characterOfWord + "");
  20.  
  21. System.out.println();
  22.  
  23.  
  24. for (String charater : text) {
  25. System.out.println(charater + ":");
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement