import java.io.*;
public class ReadFile2 {
public static void main(String[] args) {
String s;
try {
BufferedReader in = new BufferedReader(
new FileReader("ReadFile.java"));
while((s = in.readLine()) != null)
System.out.println(s);
in.close();
}
catch(IOException e) {
System.out.println("got error.");
System.exit(1);
}
}
}
Tag: Study Code Program Java
No comments:
Post a Comment