Created
January 17, 2018 15:29
-
-
Save lrlucena/7957787b43bd1b3b54c11a68fdf2e8b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main { | |
public static void main(String[] args) { | |
System.out.println("Hello world!"); | |
String s = "abc"; | |
StringBuilder sb = new StringBuilder("`"); | |
for(char c: s.toCharArray()){ | |
sb.append(String.format("\\u%04X", (int)c)); | |
} | |
sb.append('`'); | |
System.out.println(sb.toString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment