how to check if an element exists in a list?
i have a private instance var : private List account;
// the list start with an index of 0, -1 to prevent IndexOutOfBoundsException
int _accountNumber = accountNumber - 1;
Account _account = (Account) account.get(_accountNumber);
how to check that _accountNumber does exist in the account list? if not i want to throw an exception error.