Java: Convert String “\uFFFF” into char

char c = "\uFFFF".toCharArray()[0];

The value is directly interpreted as the desired string, and the whole sequence is realized as a single character.

Another way, if you are going to hard-code the value:

char c="\uFFFF";

Note that \uFFFF doesn’t seem to be a proper unicode character, but try with \u041f for example.

Read about unicode escapes here

Leave a Comment