What you have defined here, is a local variable in the definition of the class. If that doesn't make much sense, that 's because it doesn't.... If you want an instance variable then you don't need to define those, just start using them from the first point they get initialised.