+ 1

What is the difference between String and Variable?

This question is related to Java... thx for helping me 😊😊😊

2nd Sep 2017, 12:47 PM
Anand Srivastava
Anand Srivastava - avatar
4 Respostas
0
A Variable is a store of information, and a String is a type of information you would store in a Variable. A String is usually words, enclosed with "" Eg String x ="Welcome to SoloLearn" X is the Variable, and we declared it as a String, use the single = to assign the text to it.
2nd Sep 2017, 1:13 PM
Tom
Tom - avatar
+ 7
string a class .... reference datatype ... it is used to represent text type data... variable is any alphabet or gropu of alphabet which work as temporary storage locations , a variable is used to represent any value example ::: String x="anand"; // here x is variable and type of value it stores is in string
2nd Sep 2017, 1:00 PM
Changed
Changed - avatar
0
thx
2nd Sep 2017, 1:01 PM
Anand Srivastava
Anand Srivastava - avatar
0
Difference between string and variable
29th Jun 2023, 5:51 AM
Cyber warrior 2377
Cyber warrior 2377 - avatar