Created
October 5, 2011 00:57
-
-
Save DavidMah/1263322 to your computer and use it in GitHub Desktop.
throwing an exception
This file contains 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
public class experiment { | |
public static void main(String[] args) { | |
throw new ArrayIndexOutOfBoundsException(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can put in any exception instead of ArrayIndexOutOfBoundsException if it is defined already. Notice the new there -- you're actually running the constructor of a class called ArrayIndexOutOfBoundsException