import java.io.*;public class 输入 {
public static void main(String[] args) throws IOException{
float f1;
f1=System.in.read();
System.out.println(f1);
}}
我想从键盘输入一个float,却得到int
public static void main(String[] args) throws IOException{
float f1;
f1=System.in.read();
System.out.println(f1);
}}
我想从键盘输入一个float,却得到int
public static void main(String[] args)throws Exception {
BufferedReader stdin =
new BufferedReader(new InputStreamReader(System.in));
String s = stdin.readLine();
float f = Float.parseFloat(s);
}