Here is the code
Compiling it,we got
0,0,0,1,1
Obviously,If we remove Line 17
We got compiling error:
unreported exception ColorException; must be caught or declared t
o be thrown.
Removing 16 and remain Line 17
Compile OK! We got
0,1,0,1,0
We know we should consider inherit relationship of Exception.
And I am not surprising the two above-mentioned results.
My Question is
Since we put LIne 16 before Line17(as you see),
why doesn't compiling error whose statement is unreported exception ColorException (like above mentioned)?
[ edited to preserve formatting using the [code] and [/code]
UBB tags, and to add a little formatting -ds ]
[ May 11, 2004: Message edited by: Dirk Schreckmann ]