In line 2, when the method giveMeJ() is called, the variable j has not been initialised to 10. However the complier using the lookup table knows that a variable called as j exists. since j is a class variable, it is assigned default 0 value. Hence the method returns 0.
Hope I am clear.
Also there is a typing mistake in ur code. You should be creating an instance of class Test and not class AQuestion in the main method !