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 / dipesh

this will throw complie error b'coz u r overirding the
method & u overirdng method cant throw exceptions which is
not being thrown by overirded method hwevr ovrindng method
can throw runtime exceptions

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we define a package statement after the import statement in java?

1033


Explain the usage of this with constructors?

994


Why hashmap is used in java?

1034


What does java se mean?

981


What does t in java mean?

959


What is the private method modifier?

1054


What is JVM and is it platform independent?

1013


What happens if we don’t define serial version uid?

1001


Describe what a thread-local variable is in java?

976


How is tree Mirroring implemented?

1023


What is the exact difference in between Unicast and Multicast object?

2080


Can we change the value of static variable?

918


What is a buffer in java?

997


Does A Class Inherit The Constructors Of Its Superclass?

1023


What is the basic of java?

987