- Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathFileReading.java
More file actions
Latest commit
20 lines (18 loc) · 538 Bytes
/
Copy pathFileReading.java
File metadata and controls
20 lines (18 loc) · 538 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
importjava.util.*;
importjava.io.*;
publicclassFileReading {
publicstaticvoidmain(String [] args) {
StringfileName = "DeleteNodeinaBST.java";
try {
BufferedReaderbufferedReader = newBufferedReader(newFileReader(fileName));
Stringline;
while ((line=bufferedReader.readLine()) != null) {
System.out.println(line);
}
bufferedReader.close();
}
catch(Exceptione) {
e.printStackTrace();
}
}
}