Karan V Praba
posted 13 years ago
When you create an instance of A you get just that - an instance of A. Internally the JVM has to load the code for class B and allocate memory for its variables, and we could argue about whether that is "an instance" but that's not really information you want to worry about or make use of. Part of learning OO is learning to let go of the things you're not suppposed to worry about. It's hard if you're used to owning all the code but it makes life a lot easier in the long run.