0
public class example
{
public ArrayList<Integer> ToFill = new ArrayList<>();
public void Alter(int Value , int Position)
{
ToFill.get(Position) = Value ; // this line has an error
}
}
由於某些原因,此代碼給編譯錯誤,任何人都可以解釋爲什麼?意外的類型所需的變量找到值
+1正確答案和註釋。 – 2013-02-12 14:14:39