op3.java
来自「JAVA编写的一些源代码」· Java 代码 · 共 35 行
JAVA
35 行
package mp;
import java.io.*; //import语句用于加载类库
public class Op3
{
public static String op() throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String s;
System.out.flush();
s=br.readLine();
return s;
}
public static int intValue() throws IOException
{
System.out.println("输入整数回车结束");
String s=op();
int a=Integer.parseInt(s);
return a;
}
public static float floatValue() throws IOException
{
System.out.println("输入单精度浮点数回车结束");
String s=op();
float a=Float.parseFloat(s);
return a;
}
public static String stringValue() throws IOException
{
System.out.println("输入字符串回车结束");
String s=op();
return s;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?