📄 op3.java
字号:
package mp;
import java.io.*;
public class Op3 {
public static String op() throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String s; //不能用字符串对象作read方法的参量
System.out.flush();
s=br.readLine();
return s;
}
public static int intValue() throws IOException{
System.out.print("键入一个整数,按回车键结束:");
String s=op();
int a=Integer.parseInt(s);
return a;
}
public static float floatValue() throws IOException{
System.out.print("键入一个单精度浮点数,按回车键结束:");
String s=op();
float a=Float.parseFloat(s);
return a;
}
public static String StringValue() throws IOException{
System.out.print("键入一个字符串,按回车键结束:");
String s=op();
return s;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -