Documentation
Output
This is class A1
This is class A2
This is class A3
Explanation
-
Multilevel inheritance occurs when a class is derived from another derived class.
-
A3inherits fromA2, andA2inherits fromA1. -
Hence, object of
A3can access functions of A1, A2, and A3.