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

Explain the transient field modifier?

1048


What is the new line character?

1175


From the two, which would be easier to write: synchronization code for ten threads or two threads?

1051


Is nullpointerexception checked or unchecked?

1030


What are the differences between string, stringbuffer and stringbuilder?

1026


What do you understand by the term polymorphism?

1080


what are the disadvantages of indexes in oracle?

2553


Which is faster set or list in java?

1032


Tell me the latest versions in java related areas?

1094


What is a finally block?

982


Is break statement can be used as labels in java?

962


Is vector ordered in java?

994


Is null a string in java?

1074


Can we define private and protected modifiers for variables in interfaces?

1080


State the difference between strings and arrays.

1245