Variable creation example

Example 1

In the statement below, the variable 'x' is created as an integer:

<source lang="java"> int x; </source>


Example 2

In the statement below, the variable 'y' is created as a String:

<source lang="java"> String y; </source>