Created
November 23, 2012 06:28
-
-
Save moznion/4134242 to your computer and use it in GitHub Desktop.
Sample source code written in Java
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
public class Sample { | |
private boolean isActive; | |
private boolean hoge; | |
private boolean fuga; | |
public final void foo() throws IllegalAccessException, NullPointerException { | |
if (!this.isActive) { | |
throw new AssertionError(); | |
} | |
/* | |
* Do something | |
*/ | |
if (this.hoge) { | |
throw new NullPointerException(); | |
} else if (this.fuga) { | |
throw new IllegalAccessException(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment