用比較運(yùn)算符,判斷真假,中間的代碼是啥???
int a 等于16 double b 等于9.5 a 等于b 輸出結(jié)果為false 中間怎么代碼什么啊,求解
int a 等于16 double b 等于9.5 a 等于b 輸出結(jié)果為false 中間怎么代碼什么啊,求解
2017-07-13
public class HelloWorld{
??? public static void main(String[] args) {
??int a=16;
??double b=9.5;
??String str1="hello";
??String str2="imooc";
??System.out.println("a等于b:" + (a==b));
??System.out.println("a大于b:" + (a>? b));
??System.out.println("a小于等于b:" + (a<= b));
??System.out.println("str1等于str2:" + (str1==str2));
?}
}
舉報(bào)
2017-07-14
非常感謝??