您的位置:首页 > 其它

1000==1000? 无花括号的for循环,*.05x3=?

2016-03-07 17:18 302 查看
double num = 1.05;

System.out.println(num * 3);//7.3500000000000005

Integer a = 1000, b = 1000;

System.out.println(a == b);//false

Integer c = 100, d = 100;

System.out.println(c == d);//true

<script type="text/javascript">

window.onload=function(){

fn1();

}

function fn1(age,hei) {

var age;

alert(age);

function age() {

alert('hehe');

}

}

</script>

//输出:

“function age() {

alert('hehe');

}”

int a = 2;

double b = 2.22;

a += b; //对的

a = a + b; //编译出错

for (int i = 0; i < 5; i++)

Integer x = new Integer(i);//会编译出错,因为这句是声明语句,改为执行语句就可以了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: