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=one+two==>"+three);
为什么不在three=one+two;前面添加int
因为three已经定义了,int three = 0;,所以不再重新定义
请问为什么要先定义three?
three已经定义了,不需要重复定义