z********i 发帖数: 60 | 1 I have a question about my loop control as below:
class A:
B pos[][];
...
for(y=0;y<24;y++)
pos[x+1][y+1].method(...);
Class B:
public B(int x, int y) {
super(0);
this.x=x;
this.y=y;
this.name = "#";
}
public void method(...) {
....
if((x>0)&&(x<25)&&(y>0)&&(y<25)) {
....
}
it can be compiled and run, but for method in B, it only counts y from 1 to
23, I do not k |
|