Answer:
The answer to this question can be given as:
This program will give an error message that is cannot find symbol.
a.methodB(); //error
Explanation:
In this question, the program will give an error message that is cannot find symbol. Because in this question there are three class Test, class A, and class B. In this question first, we explain class A and class B then the class Test.
In class A we create constructor then we create two methods that is
methodA() and methodAB(). In the constructor and methods, we print the message. In class B class inherits class A. In this class we declare an integer variable that is used as a parameter in the parameterized constructor.
but first, we declare the default constructor then parameterized constructor. In the default constructor, we use the super keyword. Super keyword is used to call the above class method or constructors.
Then we declare the two methods that are methodB() and methodAB () in these methods we print messages. Then we define the main class that is the class Test. In this class, we define the main method and create class A object and call the class B method. that is not possible in java.