Skip to content

Instantly share code, notes, and snippets.

@moznion
Created November 23, 2012 06:28
Show Gist options
  • Save moznion/4134242 to your computer and use it in GitHub Desktop.
Save moznion/4134242 to your computer and use it in GitHub Desktop.
Sample source code written in Java
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