fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.util.regex.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. Matcher matcher = Pattern.compile("\\s").matcher("");
  13. for (int i = 0; i <= Character.MAX_CODE_POINT; i++) {
  14. String s = new String(new int[] { i }, 0, 1);
  15. matcher.reset(s);
  16. if (matcher.find()) {
  17. System.out.printf("%06X, %s\n", i, Character.getName(i));
  18. }
  19. }
  20. }
  21. }
Success #stdin #stdout 0.24s 106672KB
stdin
Standard input is empty
stdout
000009, CHARACTER TABULATION
00000A, LINE FEED (LF)
00000B, LINE TABULATION
00000C, FORM FEED (FF)
00000D, CARRIAGE RETURN (CR)
000020, SPACE