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 role of void keyword in declaring functions?

1092


Write java program to reverse string without using api?

1104


Write a function to print Fibonacci series and Tribonacci series?

1216


Explain the difference between static and dynamic binding in java?

1112


Is binary a low level language?

961


What are streams in java 8?

1044


What is bifunction in java?

1267


How do you ensure that n threads can access n resources without deadlock?

1354


Explain the difference between intermediate and terminal operations in java8?

1161


What are inner classes or non static nested classes in java?

1215


Give few examples of final classes defined in Java API?

1279


How dead lock situation occurs in java and how you can identify it?

1042


How a variable is stored in memory?

1047


Why Java doesn’t support multiple inheritance?

1086


Can we pass a primitive type by reference in java? How

978