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
Is arraylist sorted in java?
What is overriding in java?
What are meta-annotations?
What are the two types of java programming?
Is special character in java?
How do you sort arrays in java?
List some important characteristics on jre
Is java pass by value or pass by reference?
What is super keyword explain with example?
How to create a custom exception?
Explain the hierarchy of java exception classes?
Write a program in java to find the maximum and minimum value node from a circular linked list.
Is Java a dying language?
What is a data structure java?
What does math floor () do?