char Data Type in Java


The char data type is used to store a single character and must be enclosed in single quotes.

Source Code

char myGrade = 'A';
System.out.println("My grade in Java class: " + myGrade);
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments