Your global variable was not initialised anywhere. You are trying to print var i and test with values not seen / existing. It is not null or 0 nor blank.
Your case is a bit similar to this (from answer: Uninitialized int vs Integer)
i == 0; Uninitialized
i == null; Undefined
test == 0; java.lang.NullPointerException
test == null; Uninitialized
but when it's comes to main method java is asking for variable initialization.
Your local variable which are i and t is similar case to the global variables.
Variables needs to be initialised. I personally think that any computing with variables needs to have an initial value or it will not exist.
Computers are currently based on physical use of computation / mathematics, so whatever rules are in Math it will also be applied to computers unless that we have entered a new stage of computing quantum or something further.
In mathematics, a variable is a symbol (commonly an alphabetic character) designating a value that may change within the scope of a given problem or set of operations.
(from: http://en.wikipedia.org/wiki/Variable_(mathematics))
So given with that rule, a variable without any value for me is non existing empty = x is empty and no known way to compute emptiness because no one can see it.