刚学习JAVA怎么输入数据和输出

package holle;
import java.util.Scanner;
public class holle {

public static void main(String[] args) {
    // TODO Auto-generated method stub
    Scanner input= new Scanner(System.in);
    boolean b=input.nextBoolean();
    int i=input.nextInt();
    float f=input.nextFloat();
    double d=input.nextDouble();
    long lon=input.nextLong();
    System.out.println(b+" "+i+" "+f+" "+d+" "+lon+" ");
    
        

}

}
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/462195258746135.jpg "#left

你输入值的类型时候.输错了吧
true
1
1.33
0.4
52
你大概按这个输就不会有错.next后面啥数据类型.你必须是对于类型的数据

参考
https://jingyan.baidu.com/article/f3ad7d0f4942a709c3345b0c.html

输入1.0就行,不用1.0f

next后面啥数据类型.你必须是对于类型的数据,输入其他类型都会报错!