System.out.println(array);
=====>
System.out.println("Can you see this?");
System.out.println(array);1. check if the loop is endless by adding System.out.println("in loop") inside the while loop.
2. How come I can see two isEnd() in your code?
3. From your code, I don't see anything particular preventing the code from printing out array.
=====>
System.out.println("Can you see this?");
System.out.println(array);1. check if the loop is endless by adding System.out.println("in loop") inside the while loop.
2. How come I can see two isEnd() in your code?
3. From your code, I don't see anything particular preventing the code from printing out array.
for(int i=0;i<printedList.size();i++){
println(printedList.get(i).toString());
}
ArrayList array=new ArrayList();//动态数组用于存放经过处理的表达式的各个元素
ArrayList attlist=new ArrayList();//用于记录上面这个数组中的元素的性质
while(!th.isEnd())//当表达式读完了结束
{
temp=th.construct();//每次读表达式的一个元素
i=th.expShuxing();//i为这个元素的属性
n=change(i,temp);//另一个函数,只是加上对应的说明字符串
array.add(new String(n));//将n加到动态数组中,以便以后处理
System.out.println(array);//可以正确输出
} System.out.println(array);//为什么这里不输出?下面也判断到Arralist.size()小于1;