為什么不在three=one+two;前面添加int
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
2016-08-08
因為three已經(jīng)定義了,int three = 0;,所以不再重新定義
2016-09-19
請問為什么要先定義three?
2016-08-08
three已經(jīng)定義了,不需要重復(fù)定義