Answer Posted / aparna
Checked exceptions should be taken care by the user using
try and catch blocks otherwise runtime error occurs
for eg:
class.forName() method throws ClassNotFoundException which
should be caught between try and catch blocks
Unchecked exceptions are taken care by the jvm itself, user
need not worry about these type of exceptions
for eg:
Integer.parseInt() method throws NullPointerException which
need not be placed between try and catch blocks
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Write a java program that prints all the values given at command-line.
Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?
Why destructor is not used in java?
Explain the difference between abstraction and encapsulation.
Is it compulsory for a try block to be followed by a catch block in java for exception handling?
Why chararray() is preferred over string to store the password?
How do we access static members in java?
Can we inherit inner class?
What is appletviewer?
What is the difference between static and global variables and also define what are volatile variables?
What do you mean by formatting?
What is the final class?
what is nested class in java?
What is the difference between a static and a non-static inner class in java programming?
How will you serialize a singleton class without violating singleton pattern?