I might sound dumb asking this question or internet would have lot of reference about this question. But trust me I din't find any answer that answer properly. So I decided to ask this question
So here is why do we declare object this way eg Map m = new HashMap() why not HashMap m = new HashMap()
in general why we declare object of superclass type that reference to subclass object.