His supervisor, Senior Programmer Abbey Kayshun, responds that the program should not compile, saying that the Java Compiler will not allow consecutive catch clauses to catch the same exception. Neither is correct. It would be legal, but it is a bad idea.
Exceptions are best for unexpected, erroneous conditions.
Reaching the end of a file is an expected event and is best not treated as an exception. The GUI could be in another class that extends frame . There is something nonsensical about this class. The syntax is correct. MegaHard wants to convert all its documents from English to Pig Latin, in hopes of making it more difficult for competitor NetSpace to sue.