❮ Java Keywords
char myGrade = 'B'; System.out.println(myGrade);
Try it Yourself »
The char keyword is a data type that is used to store a single character.
char
A char value must be surrounded by single quotes, like 'A' or 'c'.
Read more about data types in our Java Data Types Tutorial.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!