how and when compiler knows that the Java code throws the
checked Exception.
Answer Posted / aruna
Checked or caught exceptions are those exceptions that the
application programmer created a catch block to handle them.
while compiling, the java compiler make sure that all the
checked exceptions must be caught by the applicaion
programmer.Those exceptions are called the application or
business logic exceptions.
Inside the method body, there are calls to other methods;
the compiler looks at each of their method signature, what
exceptions they declared to throw. There are two
possibilities, either exceptions are caught inside the
caller-method by a try-catch block, or the caller declares
to throw the exception to its caller.
| Is This Answer Correct ? | 18 Yes | 4 No |
Post New Answer View All Answers
What is use of super keyword?
How many bytes is a string?
What is the difference between a scrollbar and a scrollpane?
What is sortedmap interface?
What do you mean by collectors in java 8?
What is purpose of applet programming?
What is the difference between stream and buffer?
Explain about wait() method?
How do you implement polymorphism in our day to day life?
Explain some best practices you would apply while using collection in java?
What are the advantages of java inner classes?
What is abstraction in java?
What is the differences between heap and stack memory in java? Explain
Explain the importance of finalize() method.
What is complexity and its types?