Java Program to Demonstrate the order of Constructor calling

Write a Java program to demonstrate the order of constructor calling.

Source Code
//The constructors are called in order of derivation.
//Create a super class.
class A {
	A() {
		System.out.println("Inside A's constructor.");
// Create a subclass by extending class A.
class B extends A {
	B() {
		System.out.println("Inside B's constructor.");
// Create another subclass by extending B.
class C extends B {

	C() {
		System.out.println("Inside C's constructor.");
public class ConstructorCallingSeq {

	public static void main(String[] args) {
		C c = new C();

Inside A's constructor.
Inside B's constructor.
Inside C's constructor.