Variables; integer values with `int`
Java is a statically-typed language, which means that you must explicitly create each variable and tell what type of data (for example, an integer) that variable will store before using it.
We'll cover the following...
Here is an example of creating and using a variable that will store an integer value:
Press + to interact
class FortyTwo {public static void main(String args[]) {int meaningOfLife;meaningOfLife = 42;System.out.println(meaningOfLife);}}
Variable declaration
The statement int meaningOfLife
is ...