abhijeet kush wrote:If we use inheritance then does it increases the size of subclass(all the methods of superclass are added to subclass )
Not at all. Whichever technique you use, the classes have the same number of methods: those you wrote and those inherited from superclasses. Each method is recorded once for each time it is written, so overridden methods are duplicated. So there is no need to worry about using too much memory.