"Objects of class B will always have a member variable named i ."
negated by the explanation:
"Note that 'i' is not public or protected. So it will be inherited only if both the classes are in the same package."
???
The given code neither states whether class A and class B are in the same package or not.
One could assume, that since both classes are in the same Java source code file, that they have to be in the same package (although, we are not given that either). I've come to the conclusion that assumptions in programming are dangerous.
