Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

What is exception and error? and what is the difference
between them?

Answer Posted / krishnakanth

Exception and Errors are two subclasses of Throwable Class.

Exception:-Exception can be devided into two other groups.

Checked Exceptions and Unchecked Exceptions.

Checked Exceptions are the User defined exceptions and it
must be caught by the user.(Eg:IOException etc.)

Unchecked Exceptions are the subclasses of Runtime
Exception.(Eg:FileNotFound Exception,Division by Zero etc.)

Errors:-Errors are the external interrupts that terminates
the execution of the program.That means Errors ate out of
user control.It can't be catched by the user.(Eg:
OutOfMemory Exception etc.)

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is contract between hashcode and equal method?

204


What does %d do in java?

179


Can a list be null in java?

166


Can you pass functions in java?

196


Is singleton class thread safe?

178






What are different access specifiers in java?

212


Why string objects are immutable in java?

203


How is treeset implemented in java?

156


What are streams?

252


What is double data type?

186


How to print an arraylist in java?

159


How many decimal digits is 64 bit?

184


What is blank final variable?

200


How do you do math powers in java?

177


Can we convert integer to string in java?

183