How do I get a Unicode value of the first character of my String?

Every Unicode character has a certain value in this table


How do I get a Unicode value of the first character of my String? Things like “0x0024” would be trickier to work with so I’m more interested in the values listed in the second column of the table – the very same values that the compareTo() method analizes

I know something like this works for ASCII, but I don’t know if that’ll work for Unicode

String stuff = "stuff in a string";
char first = stuff.charAt(0);  // get first character
int intForFirst = (int) first; // cast char to int 
System.out.println(intForFirst);