请问一下关于第6行代码的问题
public class HelloWorld{
public static void main(String[] args){
int one=10;
int two=20;
int three=0;
three=one+two;
System.out.println(three);
}
}这里面第六行代码前面如果加了int,为什么会显示错误呢?为什么去掉int又可以了呢。
three在第五行已经设定了变量,为什么还可以再变成three=one+two;
求大神解答。感激不尽。