0
what is string
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
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'.