SuperclassX.superclassVarX has a default access and hence it will be visible to all the classes within the same package and not to anyother classes outside the package including subpackages. The statements int i; i = objY.superclassVarX; Will cause errror because superclassVarX is not visible. Mark the variabl superclassVarX public or protected and it will compile. Futher superclassVarX being a memeber variable it will be assigned a default value of 0 because its of type int even if its not assigned any explict value and hence i will have a value 0.
And yes import statement is required to import SuperclassX which is defined in packageX or if you dont want import statements refer SuperclassX in SubclassY with its full qualified name as packageX.SuperclassX. as shown below