question: protected static Character toChar ( String value ) { if ( ! value . startsWith ( "'" ) && ! value . endsWith ( "'" ) ) { throw new IllegalArgumentException ( "Character must be single quoted." ) ; } String literal = convertString ( value . substring ( 1 , value . length ( ) - 1 ) ) ; if ( literal . length ( ) != 1 ) { throw new IllegalArgumentException ( "Only one character allowed in character constants." ) ; } return Character . valueOf ( literal . charAt ( 0 ) ) ; }
target:  Convert a character literal into a character.