That code does not define a value for the variable x and does not print it.

If that code comes from a larger program, what happens when you compile and execute the code?
Add a println()...