Reputation: 21
Here is the sample:
class A{
class AA{}
}
class B:A{
}
For class A, We can say AA is the subclass of A. However, for class AA, A is the ???? of AA?
For class A, B is the child class of A Can I say A is the ???? of B?
Upvotes: 1
Views: 82
Reputation: 9837
AA
is referred to as a "nested" class. Class A
would be the container of class AA
. Class AA
is not visible outside class A
unless it is marked as public. Class B
is a child of class A
. Class A
is a base class of class B
.
Upvotes: 0
Reputation: 217313
AA
is a nested or inner type. It's not a subclass. A
is the containing or outer type.
B
derives from A
. It's a derived class. A
is the base class.
See also:
Upvotes: 5