different between exception and error? explaim check and
uncheck exception
Answers were Sorted based on User's Feedback
Answer / malligontla
Exception is caused due to programmer mistake where as error
is because of the jvm failure. Checked exception user should
handle the exception to ensure the smooth flow of the
program without any break IOException, unchecked exception
is the user might or might not handle the exception example
is Arithmetic exception
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / jreader
Exception and Error both classes extends Throwable class.
checked execption is an exception which need to be mentioned
in Throws list so that compiler can understand what type of
exception perticuler method can throw (forexample-
SQLException) whereas unchecked exception compiler will
handle and it comes at run time (for
example-IndexOutofBoundException)
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / nitin jain
Checked exceptions check at the time of compile the program
where unchecked exception check at runtime.
| Is This Answer Correct ? | 3 Yes | 0 No |
Why hashset is used in java?
class A{ class B{ } } in which name u save the file,its the program compile?
What is bubble sorting in java?
Can private method static?
Can we sort arraylist in java?
Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?
How can we make a class singleton?
How does arraylist work in java?
Is null a string in java?
What is string immutability?
what is difference between abstract factory and factory design patterns?
What is sizeof () operator?