Skip to content

Instantly share code, notes, and snippets.

@lrlucena
Created January 17, 2018 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lrlucena/7957787b43bd1b3b54c11a68fdf2e8b8 to your computer and use it in GitHub Desktop.
Save lrlucena/7957787b43bd1b3b54c11a68fdf2e8b8 to your computer and use it in GitHub Desktop.
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