Home / Java Tips Generated By ChatGPT / 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);