0

in what conditions do we use " " and ' '?

11th Sep 2016, 11:36 AM
Ali Haider
Ali Haider - avatar
4 Answers
+ 8
We use " " in assigning a value to a String data type; use ' ' in assigning a value to a char data type.
11th Sep 2016, 12:08 PM
anne_stark
anne_stark - avatar
+ 3
char var = 'a'; if (var == 'a') //character; single quotations string var = "abc"; if (var == "abc") //string; double quotations What Ananda Wisely said is correct.
11th Sep 2016, 12:58 PM
Cohen Creber
Cohen Creber - avatar
0
i don't get it please explain it with an example..
11th Sep 2016, 12:17 PM
Ali Haider
Ali Haider - avatar
- 2
😊
11th Sep 2016, 1:29 PM
Aswin Michael