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

What is multiple inheritance? Is it supported by java?

964


Explain the difference between string, stringbuffer and stringbuilder in java?

999


If two threads have same priority which thread will be executed first ?

1471


How can you traverse a linked list in java?

1127


What does exp mean in math?

985


What is instance synchronization?

1045


Is it safe to install java on my computer?

1132


What is the difference between multitasking and multithreading in Java

1176


What comes to mind when someone mentions a shallow copy in java?

1105


Explain java heap space and garbage collection?

1066


What is a databasemetadata?

948


Difference between Preemptive scheduling vs. Time slicing?

1015


How many digits is int32?

978


What are the advantages of assembly language?

928


What are peerless components?

1084