Skip to content

Commit 95f8f7e

Browse files
Update input_output#7.java
1 parent ca35f3e commit 95f8f7e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

input_output#7.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import java.io.*;
2-
public class writer_example {
3-
public static void main(String[] args) {
4-
try{
2+
public class writer_example
3+
{
4+
public static void main(String[] args)
5+
{
6+
try
7+
{
58
Writer w=new FileWriter("C:\\Users\\ABHISHEK\\Documents\\NetBeansProjects\\practice\\target\\classes\\practice_java\\test.txt");
69
String content="javajavajava";
710
w.write(content);
811
w.close();
912
System.out.println("done");
1013

1114
}
12-
catch(Exception e){
15+
catch(Exception e)
16+
{
1317
System.out.println(e);
1418
}
1519
}

0 commit comments

Comments
 (0)