Expression: (int) (char) (byte) -1
-1 is of type int
(byte) -1 is a byte with value -1
(char) (byte) -1 first the byte with value -1 is sign extended again to be an 32-bit integer of value -1. This means that all the 32-bit are set to 1 (the two-complement encoding of -1 in 32 bits). Then it is cast to the type char which is an unsigned 16-bit value, so you get 16 bits set to one, which has the value 65535.
(int) (char) (byte) -1 by explicitly casting it again to a 32-bit integer, you make sure that it is printed as a number instead of the character with the codepoint 65535.