Code Editor
Learn
Introduction to Java

Data Types III: char

Perfect. Let's look at one more Java data type: char.

The char data type is used to represent single characters. That includes the keys on a keyboard that are used to produce text.

  1. char is short for character and can represent a single character.

  2. All char values must be enclosed in single quotes, like this: 'G'.

Report a Bug
If you see a bug or any other issue with this page, please report it here.