What is Char Class In Java?
In Java, the Character
class is a wrapper class for the primitive data type char
. It provides methods for converting characters, determining properties (like uppercase/lowercase), and performing operations such as comparing characters. The class also includes constants for special character types, such as whitespace and digit checks. The Character
class is part of the java.lang
package and helps to treat characters as objects, enabling usage in collections and other data structures that require objects instead of primitives.