"throw" an Exception
public void test( ) throws myException {
Shape sh = getShape();
if (sh == null)
throw new myException(“No Shape was found”);
sh.draw();
}
Previous slide
Next slide
Back to first slide
View graphic version