0

what is string

2nd Sep 2016, 7:06 AM
Mahabu Basha
Mahabu Basha - avatar
2 Answers
+ 1
String is a sequence of characters and type of a variable. For example, if you want to set David as a variable. You have to use the string variable. For example: String person ("David"); //"String" is the type of variable //"person" is what we use to receive a variable(name of the variable) //"David" is the content of the variable
2nd Sep 2016, 7:30 AM
Mohammad Sameer
Mohammad Sameer - avatar
0
to be simple... String is a type of variable (like int) that holds english words. String var = "Hey there!" here 'var' is a variable that can hold values. But what type of values it can hold depends upon its type which is defined by the first word i.e. 'String'.
2nd Sep 2016, 10:13 AM
Vinay
Vinay - avatar