Created
July 23, 2014 18:36
-
-
Save kenorb/5c6d4780787dea86d924 to your computer and use it in GitHub Desktop.
UnreportedException Demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* UnreportedException Demo | |
* | |
* Usage: | |
* javac UnreportedExceptionDemo.java | |
* java UnreportedExceptionDemo | |
*/ | |
class UnreportedExceptionDemo { | |
public static void main(String[] args) throws ClassNotFoundException { | |
// public static void main(String[] args) { // error: unreported exception ClassNotFoundException; must be caught or declared to be thrown | |
throw new ClassNotFoundException("Class is not found!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment