read text file DEMO
来源:互联网 发布:美媛馆app软件下载 编辑:程序博客网 时间:2024/05/17 07:59
package HeadFirstJava;import java.io.*;class ReadAFile { public static void main(String[] args) { try { File myFile = new File("MyText.txt"); FileReader fileReader = new FileReader(myFile); BufferedReader reader = new BufferedReader(fileReader); String line = null; while ((line = reader.readLine()) != null) { System.out.println(line); } reader.close(); } catch(Exception ex) { ex.printStackTrace(); } }}
Whose house is this?
I think I know.
River flows happily.
Sun shines brightly.
0 0
- read text file DEMO
- Read text file
- write to text file DEMO
- read UTF-8 text file in C++
- How to read Json file or text file in Spark
- Sample of C++ read/write a text file
- Use eof() to read and display a text file.
- How to read text file in client side via HTML5
- Use eof() to read and display a text file.
- A demo usging mmap() to read a file
- A demo usging mmap() to read a file
- QT27 how to read text file and display file to a textbrowser or textedit
- File Read
- read file
- Create, Read, Write, Copy, Move and Delete a Text File using C#
- Create, Read, Write, Copy, Move and Delete a Text File using C# and VB.NET
- java read write text
- File Demo
- 更改MFC标题栏图标和生成的执行文件图标
- 交叉编译expect
- c++类成员变量初始化的一种方法
- Linux下Python 及Pexpect 的安装【自己留存】
- Cloneable Interface in java
- read text file DEMO
- hdu 1856 More is better
- Java基础
- zookeeper还不错的资料
- [Phonegap+Sencha Touch] 移动开发57 Cordova 5生成的安卓apk,versionCode错误(末尾多了个0)的解决办法
- 终南别业
- 修改静态文本框或是group box插件的字体颜色
- Seek the Value in Requested Capabilities
- 关于arcgisserver 10.0注册soe时出现的错误提示的解决方法