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

how to make a un-checked exception as a checked exception one.

Answer Posted / suvarna

Wrapping Checked Exceptions in Unchecked Exceptions
try {
// ... some code that could throw IOException or
RemoteException
} catch(Exception ex) {
throw new RuntimeException(ex.toString());
}

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we catch more than one exception in single catch block?

1039


What is Major and importance difference between for and foreach loop ?

1132


How do you invoke a method?

995


Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?

1119


Does list maintain insertion order java?

901


How thread scheduler schedule the task?

1041


Why do we need wrapper class?

982


What is a final class ?

1160


Is set thread safe java?

915


What is meant by main method?

1051


what is meant by Byte code concept in Java?

1051


What is a function in programming?

1035


Is null an object in java?

1022


What are java threads?

1116


Can a class have multiple constructors?

1019