Notice: session_start(): A session had already been started - ignoring in /home/u614325693/domains/onedoubt.com/public_html/post.php on line 3
Java char Keyword - ONEDOUBT.COM

Example

char myGrade = 'B';

System.out.println(myGrade);

 


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.

 


Login
ADS CODE