Datasets:
ArXiv:
License:
Stack-Repo / data /train /akash-coded /FSD_Java /Lesson-3 /Exception Handling /Examples /TryCatchExample1.java
Download data/train/akash-coded/FSD_Java/Lesson-3/Exception Handling/Examples/TryCatchExample1.java from RepoFusion/Stack-Repo: direct link, hf CLI and curl.
- Browser
- Download file 266 Bytes
-
https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/Exception%20Handling/Examples/TryCatchExample1.java
- Command line
-
hf download 'hf://datasets/RepoFusion/Stack-Repo@bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/Exception Handling/Examples/TryCatchExample1.java'
-
curl -L -o TryCatchExample1.java https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/Exception%20Handling/Examples/TryCatchExample1.java
266 Bytes
| /** | |
| * Let's try to understand the problem if we don't use a try-catch block. | |
| */ | |
| public class TryCatchExample1 { | |
| public static void main(String[] args) { | |
| int data = 50 / 0; // may throw exception | |
| System.out.println("rest of the code"); | |
| } | |
| } | |