?? readtextprices.java
字號:
import java.io.*;
public class ReadTextPrices
{
public static void main(String[] args)
throws java.io.IOException
{
String fileName = "prices.txt";
int i;
String inLine;
// set up the basic input stream
FileReader fr = new
FileReader(fileName);
// buffer the input stream
BufferedReader br =
new BufferedReader(fr);
// read and display three lines
for(i = 0; i < 3; i++)
{
inLine = br.readLine(); // read a line
System.out.println(inLine); // display the line
}
br.close();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -