Question: table [ [ table [ [ protected int x ; ] , [ public A ( int x ) ] , [ this

\table[[\table[[protected int x;],[public A (int x)],[this.x =x;]],,\table[[public class B extends A],[protected int x;],[public B (int x){],[this.x =x;],[}]]]]
Figure 5
19. Consider Figure 5. How would one refer to the attribute x in A from within a method of B?
(a) this.x
(b) super. x
(c)((A) this).x
(d) Both (b) and (c).
(c) It is impossible to refer to x in A from the class B.
20. Consider Figure 5. The code does not compile. Which of the following lines will make the corle compile?
(a) The first line of public A (int x) shonld be super (x):
(b) The first line of public B(int x) should be super (x) :
 \table[[\table[[protected int x;],[public A (int x)],[this.x =x;]],,\table[[public class B extends A],[protected

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!