📄 myinput.java
字号:
//Myinput.java
//该类用于处理整数、实数、字符串的键盘输入
import java.io.*;
public class MyInput
{
//read a string from the keyboard
public static String readString()
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in),1);
//Declare and initialize the string
String string=" ";
//get the string from the keyboard
try
{
string=br.readLine();
}
catch(IOException ex)
{
System.out.println(ex);
}
return string;
}
public static int readInt()
{
return Integer.parseInt(readString());
}
//read a double value from the keyboard
public static double readDouble()
{
return Double.parseDouble(readString());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -