Question: 7. Consider the following class definitions. public class A { private int al; public void methodA() { methodB(); // Statement I } } public class

7.

Consider the following class definitions.

public class A

{

private int al;

public void methodA()

{

methodB(); // Statement I

}

}

public class B extends A

{

public void methodB()

{

methodaA(); // Statement II

al = 0; // Statement III

}

}

Which of the labeled statements in the methods shown above will cause a compile-time error?

  • I only

    I only

    A

  • III only

    III only

    B

  • I and II

    I and II

    C

  • I and III

    I and III

    D

  • II and III

    II and III

    E

Submit

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!