Consider the three attached java files.
If you compile them one at a time they will all compile and the app will run.
However if you compile them en-masse you'll get nonsensical error messages:
damavand: rm *.class
damavand: javac -g Stack.java
damavand: javac -g EmbellishedStack.java
damavand: javac -g Test.java
damavand: javac -g *.java
Stack.java:26: unreported exception Stack.UnderflowException; must be caught or declared to be thrown
throw new UnderflowException();
^
Stack.java:34: unreported exception Stack.UnderflowException; must be caught or declared to be thrown
throw new UnderflowException();
^
This is actually on:
damavand: java -version
java version "1.5.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta3-b56)
Java HotSpot(TM) Client VM (build 1.5.0-beta3-b56, mixed mode, sharing)