运行明明是成功的,但是显示输入错误
price用double就行了
public class HelloWorld{
public static void main(String[] args) {
String name="爱慕课";
char sex='男';
int num=18;
double price=120.5;
boolean isOK=true;
System.out.println(name);
System.out.println(sex);
System.out.println(num);
System.out.println(price);
System.out.println(isOK);
}
}
folat感觉挺不错的为什么,这里校验的是double
float改成double