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.

Here is an example of creating and using a variable that will store an integer value:

Get hands-on with 1200+ tech skills courses.