I was wonderi开发者_如何学Gong if there was any way that i could compare and index of an arrayList and a array. I tried using the > operator and that didn't work.
I have tried something like this
if(ArrayVar[i] > arrayList.get(i) )
and i get errors.
You say that the array is of type Object and the arrayList is an Integer type. You are comparing apples and oranges.
Assuming the array acutally holds Integers as their Objects, you can cast that to an Integer and do the comparison then.
If the array doesn't have Integers (or any kind of number) how do you expect to compare them?
精彩评论