class A{
m2(){
}
}
class B extends A{
m2(){
}
}
class c extends B{
m2(){
}
}
class my_class extends c{
m2(){
}
pulic static void main(){
...My_class a = new my_class();
super.super.super.m2(); is this is leagal
if not find what is the legal procedure in order to call A's
version of m2();
}
Answer Posted / kalpit
super.super.super.m2(); is illegal there can be only super.m2();
There is no way that A's m2 & B's m2 can be called using
object of my_class.
A obj =new A();
obj.m2();
is correct
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What are the basic control structures?
What is math in java?
what is server side caching?
How do generics work?
Explain throw keyword in java?
What is a class component?
What are the differences between include directive and include action?
What is annotation in java?
What are unchecked exceptions in java?
Why are the destructors for base class and derived class called in reverse order when the program exits
Can a static class implement an interface?
What is continuity of a function?
How arrays are stored in memory in java?
What is a boolean output?
What are the 4 types of characters?