Good thinking; but you don't seem to handle the exception anywhere. That is a fair thing to do, as the spec doesn't specify what should happen when an out-of-bounds value is assigned, but in real-run applications it might be useful to actually rescue the exception and assign some valid value.