+ 1

Is string containing a single character same as a char?

2nd Mar 2018, 1:28 PM
Manroop Singh
Manroop Singh - avatar
2 odpowiedzi
+ 2
no..... char is primitive. String is an object. but if you print a char containing 'f'. and print a string containing the same , the output is the same ( things are different under the hood!)
2nd Mar 2018, 1:34 PM
Farshaad Heydari
Farshaad Heydari - avatar
0
They are different
2nd Mar 2018, 1:32 PM
sudarshan
sudarshan - avatar