public void addTransaction(Transaction t){
mSize++;
Transaction[] temp = new Transaction[mSize];
System.arraycopy(mTransactions, 0, temp, 0, mSize - 1);
temp[-1] = t // ERROR HERE
mTransactions = temp;
}
temp[-1]
should replace the last element of temp, which is empty, with the passed argument t, but instead errors.
As long as temp's size is greater than 1, this exception shouldn't happen right? All it's trying to do is modify the last element.