Java Interview Questions
Java Interview Questions
Exceptions
62. Super most class in Exception Hierarchy and what is
error and what is an exception?
63. Types of exceptions and Example for Checked and
Unchecked.
64. Difference between throw and throws.
65. How to handle an exception and can we have try and
catch block inside finally block?
66. How do we create Custom Exception and how to make
Checked or Unchecked Custom Exception.
67. Can we write only try block without catch and
finally blocks?
68. Can we have a try block without a catch block? If
yes, how?
69. Can we have executable lines of code between try
and catch blocks.
70. Can we have nested try and catch blocks.
71. Can exceptions occur at compile time.
72. Difference between error and exception.
73. Can we handle multiple exceptions in single catch
blocks.
74. With throws can we use multiple exceptions.
75. Explain finally block.