Created
February 28, 2012 18:33
-
-
Save flyx/1934186 to your computer and use it in GitHub Desktop.
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
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