Datasets:
ArXiv:
License:
Stack-Repo / data /train /akash-coded /FSD_Java /Lesson-3 /Exception Handling /Examples /NestedTryBlock.java
Download data/train/akash-coded/FSD_Java/Lesson-3/Exception Handling/Examples/NestedTryBlock.java from RepoFusion/Stack-Repo: direct link, hf CLI and curl.
- Browser
- Download file 722 Bytes
-
https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/Exception%20Handling/Examples/NestedTryBlock.java
- Command line
-
hf download 'hf://datasets/RepoFusion/Stack-Repo@bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/Exception Handling/Examples/NestedTryBlock.java'
-
curl -L -o NestedTryBlock.java https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/Exception%20Handling/Examples/NestedTryBlock.java
722 Bytes
| public class NestedTryBlock { | |
| public static void main(String args[]) { | |
| try { | |
| try { | |
| System.out.println("going to divide"); | |
| int b = 39 / 0; | |
| } catch (ArithmeticException e) { | |
| System.out.println(e); | |
| } | |
| try { | |
| int a[] = new int[5]; | |
| a[5] = 4; | |
| } catch (ArrayIndexOutOfBoundsException e) { | |
| System.out.println(e); | |
| } | |
| // System.out.println(25 / 0); | |
| System.out.println("other statement"); | |
| } catch (Exception e) { | |
| System.out.println("handeled"); | |
| } | |
| System.out.println("normal flow.."); | |
| } | |
| } | |