class Main {
public static void main(String[] args) {
char ch = 'ö';
System.out.println(getUnicodePoint(ch));
ch = 'म';
System.out.println(getUnicodePoint(ch));
}
private static String getUnicodePoint(char ch) {
String hex = String.format("%04x", (int) ch);
return hex;
}
}
No comments:
Post a Comment