Q:

When extending a gridview, why need to call super in constructor?

I implemented an expandedGridView like this Kishanjvaghela's github example or the answer of Raj008 in stack Overflow.
It works fine, but I wonder why does it need to call super() in the constructor
public class ExpandableHeightGridView extends GridView {
    boolean expanded = false;

    public ExpandableHeightGridView(Context context) {
        super(context);
    }

    public ExpandableHeightGridView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public ExpandableHeightGridView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }
/* more code here */
}

If there is no constructor, java must call parent constructor, isn't it ?

A:

Because by default(optional) super() keyword will call no-arg constructor, So to call argumented constructor of parent class it must to write super() keyword with arguments
just see how constructor chaining works

