Java characters are Unicode, not ASCII. Unicode codepoint 251 ( U + 00FB ) is the Latin Small Letter U with Circumflex. To enter various Unicode characters using a character set with only basic ASCII characters, Java provides a way to enter Unicode characters using a literal format. So you can do this:
char sqrt = '\u221a';
since U + 221A is the Unicode code number for the square root character.
This \ uXXXX format can also be used in string literals:
String s = "The square root of 2 (\u221a2) is approximately 1.4142";
If you print this line, you will see
The square root of 2 (โ2) is 1.4142
source share