-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
13.4. 자바 문서 보는 법 - 인스턴스
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import java.io.FileNotFoundException; | ||
import java.io.IOException; | ||
import java.io.PrintWriter; | ||
public class InstanceApp { | ||
|
||
public static void main(String[] args) throws IOException{ | ||
|
||
PrintWriter p1 = new PrintWriter("result1.txt"); | ||
p1.write("Hello 1"); | ||
p1.close(); | ||
|
||
PrintWriter p2 = new PrintWriter("result2.txt"); | ||
p2.write("Hello 2"); | ||
p2.close(); | ||
|
||
// PrintWriter.write("result1.txt", "Hello 1"); | ||
// PrintWriter.write("result2.txt", "Hello 2"); | ||
// PrintWriter.write("result1.txt", "Hello 1"); | ||
// PrintWriter.write("result2.txt", "Hello 2"); | ||
// PrintWriter.write("result1.txt", "Hello 1"); | ||
// PrintWriter.write("result2.txt", "Hello 2"); | ||
// PrintWriter.write("result1.txt", "Hello 1"); | ||
// PrintWriter.write("result2.txt", "Hello 2"); | ||
// PrintWriter.write("result1.txt", "Hello 1"); | ||
// PrintWriter.write("result2.txt", "Hello 2"); | ||
// PrintWriter.write("result1.txt", "Hello 1"); | ||
// PrintWriter.write("result2.txt", "Hello 2"); | ||
// PrintWriter.write("result1.txt", "Hello 1"); | ||
// PrintWriter.write("result2.txt", "Hello 2"); | ||
} | ||
|
||
} |