-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSem2_T3_5.java
More file actions
25 lines (21 loc) · 745 Bytes
/
Copy pathSem2_T3_5.java
File metadata and controls
25 lines (21 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import java.io.*;
public class Sem2_T3_5 {
public static void main(String[] args) throws IOException {
BufferedWriter bw = new BufferedWriter(new FileWriter("D:\\OE1.txt"));
BufferedReader br1 = new BufferedReader(new FileReader("D:\\even.txt"));
BufferedReader br2 = new BufferedReader(new FileReader("D:\\odd.txt"));
String o = br1.readLine();
while (o != null) {
bw.write(o);
bw.newLine();
o = br1.readLine();
}
String e = br2.readLine();
while (e!= null) {
bw.write(e);
bw.newLine();
e = br2.readLine();
}
bw.close(); br1.close(); br2.close();
}
}