?? keyboard.java
字號:
// read a text file and match certain items on separate lines
import java.io.*;
class Keyboard
{
InputStreamReader inStream;
BufferedReader stdInStream;
// override implicit constructor to open the input stream and attach it
// to a stream reader
Keyboard()
{
inStream = new InputStreamReader(System.in);
stdInStream = new BufferedReader(inStream);
}
// get one character
char getChar(String str)
{
char aChar = ' ';
System.out.println(str);
try
{
aChar = (char)stdInStream.read();
}
// empty exception handling
catch (Exception e)
{
}
return aChar;
} // end of getChar()
// get a whole line and return it as a String
String getString(String str2)
{
String aString = " ";
System.out.println(str2);
try
{
aString = (String)stdInStream.readLine();
}
// empty exception handling
catch (Exception e)
{
}
return aString;
} // end of getString()
} // end of Keyboard class
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -