< Java Programming < Keywords 
      char is a keyword. It defines a character primitive type. char can be created from character literals and numeric representation. Character literals consist of a single quote character (') (ASCII 39, hex 0x27), a single character, and a close quote ('), such as 'w'. Instead of a character, you can also use unicode escape sequences, but there must be exactly one.
Syntax:
| char variable name1 = 'character1'; | 
| 
 | 
 | 
65 is the numeric representation of character 'A' , or its ASCII code.
The nominal wrapper class is the java.lang.Character class when you need to store a char value but an object reference is required.
|  | Code section 2: charwrapping.1 char aCharPrimitiveType = 'A';
2 Character aCharacterObject = aCharPrimitiveType;
 | 
See also:
    This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.
