Skip to content

Instantly share code, notes, and snippets.

@dai0304
Created November 29, 2010 06:30
Show Gist options
  • Save dai0304/719658 to your computer and use it in GitHub Desktop.
Save dai0304/719658 to your computer and use it in GitHub Desktop.
check constructor argument 'n' before invoke super constructor
class Bar extends Foo {
Bar(Number n) {
if (n == null) {
throw new IllegalArgumentException();
}
super(n.toString());
}
}
class Foo {
Foo(String arg) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment