GeekInterview.com
Series: Subject: Topic:
Question: 656 of 994

What is difference between checked and unchecked (RuntimeException) exceptions

Asked by: Interview Candidate | Asked on: Dec 1st, 2005
Showing Answers 1 - 7 of 7 Answers
Techie

Answered On : Dec 2nd, 2005

Checked exceptions are types of exceptions, which are beyond the control of programs.say I/O exception, RemoteException.This could happen, when the resource you were looking was not found(e.g file missing or remote server is down).Unchecked exceptions are Runtime excpetions, which happens due to programmatic errors,wrong data etc.,

  
Login to rate this answer.
Maruthi

Answered On : Dec 5th, 2005

Mainly exceptions are two types Checked Exceptions and unchecked exceptions.Checked exceptions are handled by the use and unchecked exceptions are handled by JVM.Explicit handling is not needed.

  
Login to rate this answer.
vivek barsagadey

Answered On : Dec 9th, 2005

We have two type of exception , checked and unchecked. checked exc. allways says that it is return in try catch or throws block. all user define exception come under this . and unchecked say there is no need to write code inside try catch block.......

  
Login to rate this answer.
Bhumika

Answered On : Dec 7th, 2006

Checked Exceptions :

1)Indicate most conditions that a reasonable application might want to catch

2)"throws "clause checked by the compiler.

3)Not subclass of RuntimeException.

Unchecked Exceptions:

1)Indicate serious problem that a reasonable application should not try to catch and exceptions that can be thrown during the normal operation of the JVM.

2)Not checked by the compiler.

3)subclass of RuntimeException Class

  
Login to rate this answer.
fcasttro

Answered On : Mar 22nd, 2007

View all answers by fcasttro

        Checked Exceptions are not because of program errors, may be some out side sources,like file open exception.(may likely to be occured) Unchecked exceptions are because of program errors like array index out of bounds, NUll pointer ,Bad Cast exceptions etc. Checked Exceptions are checked at compile time,where as unchecked exceptiosn are at runtime.

  
Login to rate this answer.
Vipul songra

Answered On : Jul 18th, 2011

The differences between checked and unchecked exceptions are:

Checked exceptions must be explicitly caught or propagated as described in Basic try-catch-finally Exception Handling. Unchecked exceptions do not have this requirement. They don't have to be caught or declared thrown.

Checked exceptions in Java extend the java.lang.Exception class. Unchecked exceptions extend the java.lang.RuntimeException.

Vipul Songra

  
Login to rate this answer.
naga

Answered On : Mar 10th, 2012

checked exceptions are sub classes of java.lang.IOException(these are compile time exceptions)

unchecked exceptions are sub classes of java.lang.Runtime exception(these are runtime exceptions)

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.