+ 2
what is a variable in java
3 Answers
+ 7
variable is temporary storage locations where u can store data values
/ in simple words ... its a term to define something which can store values
/*
for example ::: int x =2;
String y="Mia";
double z=0;
System.out.print (y+x+y+z); //output ::: Mia2Mia0.0;
// u see , that it has reduced time , i mean u have to write "Mia" again and again for print it 2 times ... but when u store it in variable y , things become easy & time consumed to write code got reduced
*/
//hope it helpsđđ
+ 2
you can think of a variable as a place to store data in. For example x=1; You storing 1 in x.
+ 1
An instance of data, which can be modifyed multiple times while the code is running.