,如果我有這樣的:編程練習不知道什麼是好答案
public class Test {
stotic int total = 10;
public static void moin (String args [])
{
new Test
};
public Test()
{
System.out.println("In test")
;
System.out.println(this);
int temp = this.total;
if (temp > 5) {
System.out.println(temp) ;
]
]
]
會發生什麼? 編譯錯誤或 編譯將顯示在第2行(具有靜態總)錯誤或 將顯示10或 方案將在第9行(INT溫度= this.total)
我不知道什麼失敗在這裏做...
你如何編譯它並查看會發生什麼? – 2014-08-28 18:04:47
'stotic'是一個錯字嗎? – Chronicle 2014-08-28 18:04:49
要做的最好的事情是編譯和自己看看。 – dasblinkenlight 2014-08-28 18:05:05