+ 2

what is a variable in java

8th Oct 2017, 12:07 PM
Mia
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😊😊
8th Oct 2017, 1:04 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 2
you can think of a variable as a place to store data in. For example x=1; You storing 1 in x.
8th Oct 2017, 12:36 PM
Mogammad Shameer Losper
Mogammad Shameer Losper - avatar
+ 1
An instance of data, which can be modifyed multiple times while the code is running.
8th Oct 2017, 12:25 PM
Freezemage
Freezemage - avatar