部分代码:
.
.
.
public static ArrayList alI;
String word;
word = this.getTOKEN(this.arrayExe, this.record);
alI.add(new Int(word));//将声明的int变量加入alI
.
.
./**Int类如下**/
public class Int {
String name;
int value;
public Int(String name){
this.name = name;
this.value = 0;
}
}
.
.
.
public static ArrayList alI;
String word;
word = this.getTOKEN(this.arrayExe, this.record);
alI.add(new Int(word));//将声明的int变量加入alI
.
.
./**Int类如下**/
public class Int {
String name;
int value;
public Int(String name){
this.name = name;
this.value = 0;
}
}
public static ArrayList alI = new ArrayList();
word = this.getTOKEN(this.arrayExe, this.record); 我把这句换成word="xxxxx";
就没问题