A single character written within single quotes (e.g.,
'a') is of type
A single character is of type char
A signle character is of type string
CorrectionHere is what's right.
and there is no major difference between using single-quoted and double-quoted literals.
All these elements are of type
string, one of the six primitive data types.
OriginWhere could this misconception come from?
Many programming languages (such as C/C++ and Java) have a special type to denote single characters.