In the first case you are declaring a
class variable, and in the second you are declaring a
local variable. class variables are initialized for you by the compiler, local variables are not.
member variables are also initialized for you by the compiler.
To learn more about class, member, and local variables and their initilization you will have to read your
Java book.