public static void getString(){
File file = new File("C://TEXT.txt");
try {
BufferedReader bufRead = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
String str;
while((str=bufRead.readLine())!=null){
System.out.println(str);
}
} catch (Exception e) {
e.printStackTrace();
}
}
java读取文本文档
最新推荐文章于 2024-07-22 14:15:06 发布