How to declare an integer variable and set it's value to 9 | Sololearn: Learn to code for FREE!
0

How to declare an integer variable and set it's value to 9

2nd Feb 2019, 8:14 PM
Echobravo
12 Answers
+ 1
What language?
2nd Feb 2019, 8:15 PM
Eragon1980
Eragon1980 - avatar
+ 1
Java
2nd Feb 2019, 8:16 PM
Echobravo
+ 1
What about to 5
2nd Feb 2019, 8:16 PM
Echobravo
+ 1
int age = 9;
2nd Feb 2019, 8:17 PM
Eragon1980
Eragon1980 - avatar
+ 1
Thanks
2nd Feb 2019, 8:18 PM
Echobravo
0
The int means integer, or number
2nd Feb 2019, 8:17 PM
Eragon1980
Eragon1980 - avatar
0
The age is the name of the variable
2nd Feb 2019, 8:17 PM
Eragon1980
Eragon1980 - avatar
0
You can change 9 to another number
2nd Feb 2019, 8:18 PM
Eragon1980
Eragon1980 - avatar
0
And the ; is like a full stop in sentence.
2nd Feb 2019, 8:18 PM
Eragon1980
Eragon1980 - avatar
0
No problem
2nd Feb 2019, 8:19 PM
Eragon1980
Eragon1980 - avatar
0
Yes, a whole number :)
2nd Feb 2019, 8:47 PM
Eragon1980
Eragon1980 - avatar
0
A float is a decimal
2nd Feb 2019, 8:47 PM
Eragon1980
Eragon1980 - avatar