(a==b==2)!=(a==2 && b==2)
来源:互联网 发布:js获取html class属性 编辑:程序博客网 时间:2024/04/25 16:21
Once I get value of variable a and variable b ,their value are both 2.And I want to judge whether they are equal.I make a mistake for using if(a==b==2).It is wrong.Because a==b is true and then the result compares to 2 will get false.(1!=2)
So I should write like this: if(a==2 && b==2).
0 0
- A^B = B^A
- A^B = B^A
- A^B = B^A
- A^B=B^A
- Python a,b=b,a+b
- a,b=b,a+b 与 a=b,b=a+b
- uchar a=2,b=254;a-b=?
- a = b + (b = a) * 0;
- A *a=new B();
- A *a=new B();
- A *a=new B();
- 实现B=A+A’
- A a = new B();
- 交换a、b的值temp = a; a = b; b = temp;比a = a^b;b = a^b;a = a^b;快
- A == B ?
- A == B ?
- A==B?
- A == B ?
- vc工具 vcvars32.bat 和 nmake 的使用
- J2EE---SSH集成环境下对java和oracle时间的处理(系统时间)
- PE 逆向分析基础资源
- HDU-1176-免费馅饼
- 10.9笔试心得
- (a==b==2)!=(a==2 && b==2)
- Android新的工具类DiffUtil,RecyclerView的进化使用
- 观察者模式
- Unity设计模式个人总结,里氏替换原则总结
- JSP&Javascript---编写Js脚本易犯的错误
- ExpandableListView详解
- ada
- Arduino入门--led的点亮
- React(8)--DOM操作