Datasets:
ArXiv:
License:
Stack-Repo / data /train /akash-coded /FSD_Java /Lesson-3 /File Handling /Examples /FileInputStreamExample1.java
Download data/train/akash-coded/FSD_Java/Lesson-3/File Handling/Examples/FileInputStreamExample1.java from RepoFusion/Stack-Repo: direct link, hf CLI and curl.
- Browser
- Download file 337 Bytes
-
https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/File%20Handling/Examples/FileInputStreamExample1.java
- Command line
-
hf download 'hf://datasets/RepoFusion/Stack-Repo@bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/File Handling/Examples/FileInputStreamExample1.java'
-
curl -L -o FileInputStreamExample1.java https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/bbc90aef76314892f2d54f85da32b81503fb7eb3/data/train/akash-coded/FSD_Java/Lesson-3/File%20Handling/Examples/FileInputStreamExample1.java
337 Bytes
| import java.io.*; | |
| public class FileInputStreamExample1 { | |
| public static void main(String[] args) { | |
| try (FileInputStream fin = new FileInputStream("testout1.txt")) { | |
| char ch = (char) fin.read(); | |
| System.out.print(ch); | |
| } catch (Exception e) { | |
| System.out.println(e); | |
| } | |
| } | |
| } | |