为了账号安全,请及时绑定邮箱和手机立即绑定

为什么开头不能加int比如

public class HelloWorld{

    public static void main(String[] args) {

   int one = 10 ;

        int two = 20 ;

        int three = 0 ;

        int three = one + tow;

        System.out.println("three = one+ tow==>"three);

}

}


正在回答

1 回答

没看懂你要表达什么

0 回复 有任何疑惑可以回复我~
#1

张二呆 提问者

我那时想用int再定义一次three,出现错误了
2018-02-25 回复 有任何疑惑可以回复我~
#2

慕函数7096275 回复 张二呆 提问者

这时候就不用再次定义了,three已经是整形了,直接赋值就行了。 你的two打错了
2018-02-25 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

为什么开头不能加int比如

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信