Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

Java char Keyword

❮ Java Keywords


Example

char myGrade = 'B';
System.out.println(myGrade);

Run example »


Definition and Usage

The char keyword is a data type that is used to store a single character.

A char value must be surrounded by single quotes, like 'A' or 'c'.


Related Pages

Read more about data types in our Java Data Types Tutorial.


❮ Java Keywords