In this example we will show you how to create a char type in Java.
Source Code
package com.beginner.examples;
public class CharType {
public static void main(String[] args) {
char letter = 'd'; // char
System.out.println(letter);
}
}
Output:
d