a) If a base class has a method such as : public int ABC(), an inherited class cannot reduce accessibility to this method by declaring it as protected (i.e. protected int ABC()) b) Assume class B in inherited from class A. The following statement, where a1 and b1 are references to objects from A and B respectively, would result in compilation error: a1 = (A)b1; c) A constructor of an inherited class has the right to call the this() constructor and the super() constructor but super() must be called first d) Even if a class A is created as an abstract class, the following code will still be okay: A a1; e) The keyword extends indicates polymorphism.
PLZ help with the following:
IN JAVA asnwers if the following are true or false
True/False
a) If a base class has a method such as : public int ABC(), an inherited class cannot reduce accessibility to this method by declaring it as protected (i.e. protected int ABC())
b) Assume class B in inherited from class A. The following statement, where a1 and b1 are references to objects from A and B respectively, would result in compilation error: a1 = (A)b1;
c) A constructor of an inherited class has the right to call the this() constructor and the super() constructor but super() must be called first
d) Even if a class A is created as an abstract class, the following code will still be okay: A a1;
e) The keyword extends indicates polymorphism.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps