?? systemin.java
字號:
package io;
import java.io.*;
public class SystemIn {
public static void main(String[] args){
InputStreamReader isr=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
//-----------------------------------------------------------------------------
try {
String strLine;
while((strLine=br.readLine())!=null){//readLine()方法一次只讀取一行文本.
System.out.println(strLine);
}
br.close();
} catch (IOException e) {
e.printStackTrace();
}
/* 如果這樣寫則程序?qū)⑦M入死循環(huán).
* try {
String strLine=br.readLine());
while((strLine!=null){//readLine()方法一次只讀取一行文本.
System.out.println(strLine);
}
br.close();
} catch (IOException e) {
e.printStackTrace();
}
*/
//-----------------------------------------------------------------------------
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -