Datasets:
ArXiv:
License:
Stack-Repo / data /train /akash-coded /FSD_Java /Lesson-3 /Exception Handling /Examples /ExceptionPropagation.java
Download data/train/akash-coded/FSD_Java/Lesson-3/Exception Handling/Examples/ExceptionPropagation.java from RepoFusion/Stack-Repo: direct link, hf CLI and curl.
- Browser
- Download file 463 Bytes
-
https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/Exception%20Handling/Examples/ExceptionPropagation.java
- Command line
-
hf download 'hf://datasets/RepoFusion/Stack-Repo@bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/Exception Handling/Examples/ExceptionPropagation.java'
-
curl -L -o ExceptionPropagation.java https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/Exception%20Handling/Examples/ExceptionPropagation.java
463 Bytes
| 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..."); | |
| } | |
| } | |