📄 inputstreamreaderexample.java
字号:
import java.io.*;class InputStreamReaderExample{ public static void main(String args[]) { System.out.println("Type a line of text. Type 'exit' to quit the program."); // Create the middle stream wrapper InputStreamReader in = new InputStreamReader( System.in ); // Create a buffered reader around the InputStreamReader BufferedReader reader = new BufferedReader( in ); String data = null; try { // Keep looping until the user hits just return while( (data = reader.readLine()).indexOf( "exit" ) == -1 ) { System.out.print("The line you typed was: "); System.out.println( data ); } } catch ( IOException ex ) { System.out.println( ex ); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -