Java Interview Exception Concept
Exception Handling:-
1) If There are parent child class and if parent class throws exception than child class override method should throws the same exception otherwise compiler will give an error .
7) try catch finally
8) Finally block will be executed always until unless some one use System.exit either in try block or catch block .
9) try with multiple catch are allowed by Exception should't be defined in first catch since it's parent class for exception .
10) Inside finally we can use try catch block .
10) Inside finally we can use try catch block .
11) try with resource after Java 7 is allowed
java.lang.Throwable is the superclass for all types of errors and exceptions in java.
Collection Concept :- Link
Comments
Post a Comment