Skip to content

Instantly share code, notes, and snippets.

@flyx
Created February 28, 2012 18:33
Show Gist options
  • Save flyx/1934186 to your computer and use it in GitHub Desktop.
Save flyx/1934186 to your computer and use it in GitHub Desktop.
class A {
void method(A someObj) {
// .. do something here
}
}
class B extends A {
// .. declare something here
}
// .. inside some method
A objA = new A();
B objB = new B();
// so, B inherits "method" from A. but does someObj inherit type B?
objB.method(objA);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment