java(2)

来源:互联网 发布:约翰施特劳斯乐团 知乎 编辑:程序博客网 时间:2024/05/16 19:20

System.out.println(10>3);   ,,,,,,true

算术运算的优先级高于关系运算符7>=3+4.........true


float a=1.2f;
float b=1.2001f;
System.out.println(Math.abs(a-b)<=0.0001);浮点数之间比较大小的方法。。。。。。。。。。


boolean a=true;

优先级:!>&&>||


debug....。。。。。。。。。。。设断点。。。调试哦,非常好用哦,,便于观察过程。。。。。。。。。。。。


ctrl +shift+f调整缩进格式i.........................sorce ..format。。。。。。。。。。。。

m

!!!!!!!!!!单一出口:统一出口进行输出。。。。。if  else if   else if  elseif   else System.out.println();

三元运算符:?:;(相当于IF else语句。。。。。。)

case : break;default:


0 0
原创粉丝点击