Contact PSVM   (Q & A)  |  Notes Below   Audio  |  [toc]   [prev] Slide 9 of 13 [next]
SIJLesson24 Slide09
1, 2, 3, 4, 5, 6, 7, 8, [9 (top)], 10, 11, 12, 13, [Lab]

Notes for Slide 09
There are a couple of errors that are likely to occur
while you are writing programs that involve using String methods.
Both of these errors occur while you are running your program
(after pressing the [Start] button). For example,
your program may or may not work correctly,
depending on input values. If your program assumes that
there is a space in between a first and last name and
you test your program without a space, your assumption was
not met and your code might use a method incorrectly.
So, if your program tries to use the .substring() method
between positions 5 and 10 but the String only has nine
characters in it, the program will stop and let you know
that there was a SubstringOutOfRange exception.


1, 2, 3, 4, 5, 6, 7, 8, [9 (top)], 10, 11, 12, 13, [Lab]