62,623
社区成员
发帖
与我相关
我的任务
分享
try {
BufferedReader bf = new BufferedReader(new InputStreamReader(new FileInputStream("D:/test.txt")));
String a = "";
String tmp = "";
while((tmp=bf.readLine())!=null) {
a = a + tmp;
}
System.out.println(a);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}