char is effectively an unsigned 16-bit integer type in Java.
Like other integer types, you can perform an assignment conversion from an integer constant to any integer type so long as it's in the appropriate range.
And it is legal to ,
public static int getValue(char character){
return character;
}