Throwing Exception error
Im having problem within a method throwing an IndexOutofBoundsException. I tried a few different things but I still recieve this error:
SortedDoubleList.java:39: cannot find symbol
symbol : class IndexOutofBoundsException
location: class SortedDoubleList
else throw new IndexOutofBoundsException("Index not within parameters.");// it points to the Index in IndexOutOfBounds...
publicvoid ListInsert(int pos,int newItems)
throws IndexOutOfBoundsException, RuntimeException
{
if (numItems >=List_Size)
thrownew RuntimeException("List is full.");
if (pos >=1 && pos <= numItems)
{
for (int i=numItems; i >= pos; i--)
items[i]= items[i-1];
items[pos-1]=newItems;
numItems++;
}
elsethrownew IndexOutofBoundsException("Index not within parameters.");
}

