Creating Unicode character from its number

后端 未结 13 1715
挽巷
挽巷 2020-11-28 21:38

I want to display a Unicode character in Java. If I do this, it works just fine:

String symbol = \"\\u2202\";

symbol is equal to \"∂\". That\'

相关标签:
13条回答
  • 2020-11-28 22:28
    String st="2202";
    int cp=Integer.parseInt(st,16);// it convert st into hex number.
    char c[]=Character.toChars(cp);
    System.out.println(c);// its display the character corresponding to '\u2202'.
    
    0 讨论(0)
提交回复
热议问题