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{
some variables;
public void a()throws Excepion1,Exception2{....}
}
class B extends A{
variables...
public void a()throws E2,E3{.....}
}
Qns:
here override of methods occurs or not,ore else wil give
any compilation error or run properly..plz tell me briefly
whts happening with the above codes....

Answer Posted / jeevan

It is a good programming practice to have only a sub set of
checked exceptions classes from the throws clause of the
inherited method of the superclass.


Here in the above example E2,E3 exception are not a subset
of the exception classes of the inherited method

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of exception handling?

1119


Explain the use of javap tool.

1185


Why stringbuffer is faster than string?

1092


What one should take care of, while serializing the object?

956


Define "Access specifiers" in java.

1217


what r advatages of websphere? & how to deploy?

2259


Explain exception chaining in java?

1225


What is anagram in java?

974


How do you sort an array in java?

1047


What is compareto?

1105


Can an interface implement another interface?

1091


What is runtime polymorphism or dynamic method dispatch?

1051


What are scriptlets?

1139


What is final, finally, finalize?

1192


What are the advantages of compiled language?

1112