UndeclaredVariables
DRAFT

Misconception:

Variables can be introduced at any time, just by using their name.

Incorrect

Variables don't need to be declared

Correct

Correction
Here is what's right.

Wrong. All variables have to be declared before being used. The place of the declaration determines whether a variable is a local variable, a method argument, an instance variable, or a class variable. The declaration also specifies the type of the variable.

Language

Java

Concepts

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.