在您閱讀我的問題,知道我不好英語詮釋到靜態
public Name()
{
ID = 1;
loadOptions();
}
private void loadOptions
{
// code
if (as[0].equals("ID"))
{
ID = Integer.parseInt(as[1]);
}
// more code
}
static
{
ID1 = ID;
}
ID1是0,但我想,這是Integer.parseInt(as[1]);
...請幫幫我!
通過重寫您的問題來幫助我們。 – nullpotent 2012-04-28 14:19:34
通過在您的問題中添加相關語言標籤來幫助我們。 – 2012-04-28 14:20:04
你能分享更多的代碼嗎?你是否想要在靜態塊中將ID1 = value作爲[1]? – mprabhat 2012-04-28 14:21:12