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...

Can multiple catch statements be used in exceptions ?

Answer Posted / sakthi k

Yes we can use multiple catch statement for the exception.
try
{
Sop("exception");
}
catch(NumberFormatException)
{
}
catch(Exception)
{
}
we have to include the child exception above the parent
exception otherwise it shows an error. .

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is diamond operator in java?

938


What is methods in java?

996


Explain features of interfaces in java?

977


In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?

1046


How many types of memory areas are allocated by jvm?

1031


What are different types of arrays?

1009


What is canonical name in java?

1118


Differentiate between the constructors and methods in java?

937


What is advantage of java?

1014


How does varargs work in java?

1081


What are the uses of synchronized keyword?

996


What do you understand by Header linked List?

1091


Why do we use string?

1021


What is Gang of four design patterns

1049


Difference between default and protected access specifiers?

1106