three前面為什么不用加變量類型
? int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;
? ? ? ? three=one+two;
? ? ? ? System.out.println("three = one + two ==>"+three);
這里中間的three的前面為什么不用加變量類型?
? int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;
? ? ? ? three=one+two;
? ? ? ? System.out.println("three = one + two ==>"+three);
這里中間的three的前面為什么不用加變量類型?
2018-10-21
舉報
2018-10-21
因為第三行定義過了three(? int three = 0 ;)定義了的變量后面直接引用就是了