0
Whats a "var"
3 Respostas
+ 5
There is no var in Java. If you didn't mean litteraly "var" and just meant variable, then by definition it is just something that stores a value. Like an int or String.
int x;
^^ In general terms this is a variable of type int. But there is no var keyword in Java.
If you meant Javascript, the keyword 'var' is short for 'variable', which declares (creates) a variable.
A variable can later be used to retrieve whatever the variable is storing.
var x = 15;
alert(x);
Output: 15.
This should be covered in the Javascript course.
+ 1
Variable
0
thank you