char is one character. String is zero or more characters.

char is a primitive type. String is a class.

char c = 'a';
String s = "Hi!";

Note the single quotes for char, and double quotes for String.

Answer from user207421 on Stack Overflow
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › lang › Character.html
Character (Java Platform SE 8 )
March 16, 2026 - Java™ Platform Standard Ed. 8 ... The Character class wraps a value of the primitive type char in an object.
🌐
W3Schools
w3schools.com › java › ref_keyword_char.asp
Java char Keyword
Java Examples Java Videos Java ... Plan Java Interview Q&A Java Certificate ... The char keyword is a data type that is used to store a single character....
🌐
Oracle
docs.oracle.com › javase › tutorial › java › data › characters.html
Characters (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)
There are times, however, when ... a wrapper class that "wraps" the char in a Character object for this purpose. An object of type Character contains a single field, whose type is char....
🌐
Tutorialspoint
tutorialspoint.com › java › java_characters.htm
Java - Character Class
static Class<Character> TYPE − This is the Class instance representing the primitive type char. static byte UNASSIGNED − This is the General category "Cn" in the Unicode specification. static byte UPPERCASE_LETTER − This is the General category "Lu" in the Unicode specification. This class inherits methods from the following classes − ... The following example shows the usage of Java Character charCount() method.
🌐
W3Schools
w3schools.com › java › java_data_types_characters.asp
Java Data Types Characters
Java Examples Java Videos Java Compiler Java Exercises Java Quiz Java Code Challenges Java Practice Problems Java Server Java Syllabus Java Study Plan Java Interview Q&A Java Certificate ... The char data type is used to store a single character.
🌐
Study.com
study.com › courses › business courses › java programming tutorial & training
Java: Char Data Type - Lesson | Study.com
August 11, 2020 - In Java, char is short for character. It's 16 bits in size - double that of a byte. Most of the time however, the actual data stored in the char data type doesn't take up more than 8 bits.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › java › character-class-java
Character Class in Java - GeeksforGeeks
January 23, 2026 - The Character class in Java, available in the java.lang package is a wrapper class used to represent a single char value as an object.
🌐
Baeldung
baeldung.com › home › java › java string › difference between java’s “char” and “string”
Difference Between Java’s “char” and “String” | Baeldung
January 8, 2024 - We can also say char is an unsigned 16-bit integer from 0 to 65535 (216-1). However, String is an essential class in Java.
🌐
Software Testing Help
softwaretestinghelp.com › home › java › java char – character data type in java with examples
Java char - Character Data Type In Java With Examples
April 1, 2025 - The data type char comes under the characters group that represents symbols i.e. alphabets and numbers in a character set. The Size of a Java char is 16-bit and the range is between 0 to 65,535.
🌐
Oracle
docs.oracle.com › javase › 7 › docs › api › java › lang › Character.html
Character (Java Platform SE 7 )
Java™ Platform Standard Ed. 7 ... The Character class wraps a value of the primitive type char in an object.
🌐
Oracle
docs.oracle.com › javame › config › cldc › ref-impl › cldc1.0 › jsr030 › java › lang › Character.html
java.lang Class Character
java.lang.Object | +--java.lang.Character · public final class Character · extends Object · The Character class wraps a value of the primitive type char in an object. An object of type Character contains a single field whose type is char. In addition, this class provides several methods ...
🌐
iO Flood
ioflood.com › blog › java-char
Char Data Type in Java: How to Declare and Use
February 26, 2024 - Let’s explore two of these: the Character wrapper class and using Strings. Java provides a wrapper class, Character, that encapsulates a char value and provides numerous methods to manipulate and inspect characters.
🌐
CodeGym
codegym.cc › java blog › java types › char data type in java
Char Data Type in Java
April 24, 2025 - The char data type in Java is a primitive type that holds a single character, like a letter, digit, or symbol. It's stored in 16 bits (2 bytes), unlike some languages that use 8 bits, giving it room for 65,536 possible values
🌐
DataCamp
datacamp.com › doc › java › char
char Keyword in Java: Usage & Examples
Learn how to use the `char` keyword in Java to store and manipulate 16-bit Unicode characters with examples and best practices. Master character handling in Java efficiently.
🌐
Dev.java
dev.java › learn › numbers-strings › characters
Characters - Dev.java
September 14, 2021 - toString(char ch): Returns a String object representing the specified character value — that is, a one-character string. The Java platform has supported Unicode Standard starting with JDK 1.0.2. Java SE 15 supports Unicode 13.0. The char data ...
🌐
Mathbits
mathbits.com › JavaBitsNotebook › LibraryMethods › CharacterMethods.html
Java Character Class and Methods - JavaBitsNotebook.com
We have worked with characters (char) as primitive data types. Now, we are ready to examine the Character class which offers a number of useful methods for manipulating characters · Character is located in the java.lang package. The full class name is java.lang.Character.