I have an integer vector list in java (ArrayList ListVet).
public static ArrayList<Integer> ListVet;
And I need to make a comparison between two numbers in that same vector list. So I did like this:
for (int i=0; i<ListVet.size();i++)
{
if (ListVet[i] > ListVet[i+1])
{
}
}
However, this error occurred:
Multiple markers at this line
- The type of the expression must be an array type but it is resolved to ArrayList
Why did you cause this error? Thank you.