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