It helps to read your post if you enclose it in code tags.
Since an
scjp object is also an instance of the exam class, each scjp object inherits the public print() method. But this inherited method can only "see" the member x of the parent class, namely x="easy". Try variants of this code by overriding print() in scjp, or changing access modifiers.