I recently went through the concept of inheritance.
As we all know, in inheritance, objects superclassare created / initialized before objects subclass. Therefore, if we create an object subclass, it will contain all the information about the superclass.
But I was stuck at some point.
Are superclass and subclass methods used in a separate call stack? If so, is there specific reasonfor the same? If this is not the case, why aren't they showing up on the same call stack?
eg.
class A {
void play1( ) {
}
}
class B extends A {
void play2( ) {
}
}
Then run if the above method, ie 2 play1( )and play2( )in a separate call stack?
Thank.
user327663
source
share