Character
layout: default
title: Character
A Character object encapsulates a single Unicode char value.
Constants¶
-
MIN_VALUE:\u0000 -
MAX_VALUE:\uffff
Methods¶
Characterhas a large number ofbooleanmethods for testingcharvalues.
char c = '\u03a6'; // uppercase Greek phi
if ( Character.isUpperCase(c) ) {
System.out.println("Uppercase letter: " + c);
}
Caching¶
Character, like the integer-type wrapper classes, maintains an internal cache of important char wrapper objects.
- The cached values are the original ASCII characters, from
0to127(nul to del,\u0000to\u007f).