爲什麼我不能在構造函數中使用靜態變量作爲變量修飾符,並且會爲例如構造函數的最終工作例如在我的代碼中,我想將變量初始化爲15的常量,以便在構造函數創建時在主程序中構造函數中的變量修飾符
public class RegularProcedure {
// the duration period of a regular procedure is 15
int []procedure;
public RegularProcedure(int t){
final int times=15;
procedure=new int[times];
for(int i=0; i <procedure.length;i++){
procedure[i]=i;
}
}
}
非常感謝您的幫助 – logic101 2011-05-03 13:50:28