What is the difference between Checked and Unchecked
exception? Give some examples
Answer Posted / padmaja
1. Checked exceptions are exceptions that must be
declared in the throws clause of a method. A checked
exception indicates an expected problem that can occur
during normal system operation. Checked exceptions must be
2. Unchecked exceptions are exceptions that do not
need to be declared in a throws clause. An unchecked
exception indicates an unexpected problem that is probably
due to a bug in the code. The most common example is a
NullPointerException.They don't have to be caught or
declared thrown.
3. Checked exceptions in Java extend the
java.lang.Exception class. Unchecked exceptions extend the
java.lang.RuntimeException.
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Explain when we should make an instance variable private.
What is a boolean structure?
Difference difference paint() and paintcomponent()?
How do I get a substring?
What is the benefit of using enum to declare a constant?
explain multi-threading in java?
How can u increase the heap size in the memory?
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea
Can we call thread start () twice?
I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com
Is char a method in java?
What is the intersection and union methods?
How do I enable java in safari?
What are java annotations?
What are invisible components?.