Q: Why does instantiating a class output the class's contents? I'm learning about inheritance and am working with this simple program that has has a superclass and a subclass as shown below. My question isn't specific to this program; however, this is where I've first seen this happen so I'm using it as an example for a more general conceptual  question. Why does simply instantiating the class run the constructors and output the contents? My previous understanding was that instantiating the class simply creates the object but it wont do anything. 
SuperClass1.java 
public class SuperClass1 {
            public SuperClass1(){        
                System.out.println("This is the superclass constructor.");
            }
        }

SubClass2.java
public class SubClass2 extends SuperClass1
{
    public SubClass2()
    {
        System.out.println("This is the subclass constructor.");
    }

}

Main.java
public class Main {

    public static void main(String[] args)
    {
        SubClass2 obj1 = new SubClass2(); // why should this print something?
    }
}

Output 
This is the superclass constructor.
This is the subclass constructor.

A: First of all, instantiating an object means calling (and executing) the constructor, that is what it is for.
So, this:
SubClass2 newInstance = <createNewInstance>;
newInstance.<init()>;

is both done by the constructor call new SubClass2() in Java. There is no separation between "constructing" the object and "initialising" its properties.
Furthermore, if you do not explicitly call another constructor of a super class the default constructor (the one without arguments) is automatically called first thing when creating an object of a class. So instantiating an object of the subclass calls the superclass contructor (which prints the first line), and then prints the second line itself.
More in detail, the subclass looks like this behind the scene:
public class SubClass2 extends SuperClass1
{
    public SubClass2()
    {
        super();   // calls the superclass constructor
        System.out.println("This is the subclass constructor.");
    }
}


A: Because the constructor you call includes a print statement.
You call the constructor method SubClass2() which has a print statement in it.

A: The statements are not printed because the class ist loaded, but because an object of that class in instantiated and the constructors are called:
That a class can be loaded without using constructor is demonstrated by the following code:
public class Test {

    public static void main(String[] args) {
        try {
            Class.forName("Test$Inner");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

    static class Inner {
        static {
            System.out.println("static initializer");
        }
        public Inner() {
            System.out.println("inner ctor");
        }
    }
}

running that program shows that only the static class initializer is called and no constructor.
