Created
November 21, 2016 21:09
-
-
Save FreeFly19/b45f671296a16aec3e670a3f445b879f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| public class Task1 { | |
| public static void main(String[] args) throws IOException { | |
| File file = new File("D:/test-java.txt"); | |
| file.createNewFile(); | |
| FileOutputStream outputStream = new FileOutputStream(file); | |
| outputStream.write("Hello, dear student!\nHow are you?".getBytes()); | |
| outputStream.close(); | |
| System.out.println(getAllTextFromFile(file)); | |
| file.delete(); | |
| } | |
| // Your implementation of getAllTextFromFile function | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment