Q:

java assignment in char

I am learning java and the answer of one question seems to be wrong:
question: Which of the following are legal?
char c = 0x1234;//A
char c = \u1234;//B
char c = '\u1234';//C

in the book the answer is C, but I think it should be both A and C. Anyone please verify that for me?

A:

Both A and C are correct
char a = 0x1234;

The literal 0x1234 is a hex integer literal. Its value fits in the char primitive type, so it is valid;
char b = \u1234;//B

Is not valid notation and so won't compile.
char c = '\u1234';

char is 

char: The char data type is a single 16-bit Unicode character. It has
  a minimum value of '\u0000' (or 0) and a maximum value of '\uffff' (or
  65,535 inclusive).

So it's valid.

