Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the basic control structures?

996


What is math in java?

1065


what is server side caching?

2175


How do generics work?

951


Explain throw keyword in java?

1050


What is a class component?

1177


What are the differences between include directive and include action?

1193


What is annotation in java?

1054


What are unchecked exceptions in java?

1044


Why are the destructors for base class and derived class called in reverse order when the program exits

2212


Can a static class implement an interface?

1127


What is continuity of a function?

1094


How arrays are stored in memory in java?

981


What is a boolean output?

966


What are the 4 types of characters?

1014