Hi!
I just don't get it. I have three nested for-loops and the counter-variables for these loops are definied globally. The if-statement in the third for-loop does not recognize the variables "i" and "e"... WHY?
And this is the error message from javac:
Any help is appreciated!
Cheers
frag
patrick.metz@epost.de
I just don't get it. I have three nested for-loops and the counter-variables for these loops are definied globally. The if-statement in the third for-loop does not recognize the variables "i" and "e"... WHY?
Code:
for( i = 0; i < oldVec.size(); i++ )
{
for( e = 0; e < newVec.size(); e++ )
{
equal = 0;
for( x = 0; x < ((Vector)newVec.elementAt(e)).size(); x++ )
{
if( oldVec.elementAt(i).elementAt(x) == newVec.elementAt(e).elementAt(x) ){
equal++;
}
}
if( equal == 3 ) isDuplicate = true;
}
if( !isDuplicate )
newVec.add(oldVec.elementAt(i));
}
And this is the error message from javac:
Code:
ReloadScheduleObj.java:50: cannot resolve symbol
symbol : method elementAt (int)
location: class java.lang.Object
if( oldVec.elementAt(i).elementAt(x) == newVec.elementAt(e).elementAt(x) ){
^
ReloadScheduleObj.java:50: cannot resolve symbol
symbol : method elementAt (int)
location: class java.lang.Object
if( oldVec.elementAt(i).elementAt(x) == newVec.elementAt(e).elementAt(x) ){
Any help is appreciated!
Cheers
frag
patrick.metz@epost.de