Data Type Java Tutorial

Variables of type char
store a single character code.
occupy 16 bits, or 2 bytes,
all characters in Java are stored as Unicode.

public class MainClass{
  public static void main(String[] arg){
     char myCharacter = 'X';
     
     System.out.println(myCharacter);
  }
}
X