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 is the Difference between Final Class && Abstract Class?
Is 0 true or is 1 true?
What are the benefits of operations in java?
How do you override a method in java?
What is binary search in java?
What are different types of constants?
What does the “static” keyword mean? Can you override private or static method in java?
What is return type in java?
What is the use of bufferedreader?
What are the differences between checked exception and unchecked exception?
What do you mean by constructor?
What is the use of using enum to declare a constant?
Hi all, I am dng a mini project on FileSplitter application which splits the GBs of logfile into Smaller chunks(mbs) depending on the split size." How to handle GBs file? I am getting OutOfMemoryException, when I input such GB sized file. Thx
What is an example of a keyword?
Why java strings are immutable in nature?