0

what is the char datatype

17th Oct 2016, 8:22 PM
Pramod Aryar
Pramod Aryar - avatar
2 Réponses
+ 4
It is datatype for a single character. Strings can be used as arrays of chars. Declaration : char myChar = 'm';
17th Oct 2016, 8:32 PM
Ivan G
Ivan G - avatar
+ 1
I think that's not a good idea to use Strings as arrays of char because except if you affect this array to a String you cannot use String's methods. Don't forget that the String "type" is an object in fact.
17th Oct 2016, 9:21 PM
Olivier