To fix a defect:
From the View menu, select Other Windows and Project Window.
Select the Asset Browser in the Project Window.
Select the Sort Method named by File, expand the PhoneNumber.java node, the baseStation child package and the PhoneNumber child node. Now, double-click the removeDigit() method node.
Take a look at the removeDigit() method. What should happen is that whenever the removeDigit() method is called, the last digit of the phone number - actually stored as a string - should be removed. However, look at the line that actually removes the digit:
_numbers.removeElementAt(0);
In fact, the first digit of the phone number is being removed - this is a defect. The value passed to the removeElementAt() method should be the location of the last element in the string containing the phone number. You have to modify the code.
Change the following code from:
_numbers.removeElementAt(0);
to
_numbers.removeElementAt(_numbers.size()-1);
Select the menu item File->Save
This should fix the problem. In the next topic, you will rerun your test to make sure the unexpected exception goes away.