📄 input3.java
字号:
/**
*Another way in Java to get input from the keyboard,
*/
import java.io.*;
class Input3
{
public static void main(String args[]) throws IOException
{
double value;
value = getDouble();
System.out.println(value);
}
public static String getString() throws IOException
{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
return bf.readLine();
}
public static int getInt() throws IOException
{
String s = getString();
return Integer.parseInt(s);
}
public static char getChar() throws IOException
{
String s = getString();
return s.charAt(0);
}
public static double getDouble() throws IOException
{
String s = getString();
return Double.parseDouble(s);
}
public static long getLong() throws IOException
{
String s = getString();
return Long.parseLong(s);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -