Char datatype in Java-Why do we have to use single quotes instead of double quotes


#1

Char datatype in Java-Why do we have to use single quotes instead of double quotes?

Why is it not printing if I use double quotes ?


#2

Chars are indicated by single quotes, Strings are (technically) arrays of chars, signified by double quotes.

If you’re calling it a char, don’t use double quotes.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.