i have come across a code from the
scjp 1.6 by kathy & bates
a block of code showing static context
the error can be resolved by placing the static keyword before int.
the other code which also sticks to same issue(in my point of view) but compiles fine without showing an error what concept did i missed to the point in the following code.
here i feel that the year variable which is a instance variable should through an error when accessed in the method from the above code point of view, i know that i used this particular way writing the piece of code like declaring the instance variables and references in the class but i doubt what i am missing when comparing with the above two codes. can anyone please explain.