JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public class Unicode {
/*
This program prints a defined range of unicode
symbols and their respective hexadecimal representation
Implemented: THU,SEP 13, 2018, AST
*/
public static void main(String[] args) {
char c = '\u2701';
System.out.println("Symbol | " + "Hex Value");
for (int i = 1; i <= 120; i++) {
System.out.println(c + " = " + Integer.toHexString(c));
c++;
}
System.out.println("\nTo use a unicode symbol in your program\njust initialize a String or char with the symbol's\nhext value preceded by the unicode escape specifier '\\u' \ne.g String symbol = \"\\u2706\" ");
}
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run