Datasets:
ArXiv:
License:
Stack-Repo
/
data
/train
/akash-coded
/FSD_Java
/Lesson-3
/Exception Handling
/Examples
/ExceptionPropagation.java
| public class ExceptionPropagation { | |
| void m() { | |
| int data = 50 / 0; | |
| } | |
| void n() { | |
| m(); | |
| } | |
| void p() { | |
| try { | |
| n(); | |
| } catch (Exception e) { | |
| System.out.println("exception handled"); | |
| } | |
| // n(); | |
| } | |
| public static void main(String[] args) { | |
| ExceptionPropagation obj = new ExceptionPropagation(); | |
| obj.p(); | |
| System.out.println("normal flow..."); | |
| } | |
| } | |