This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
When you create object for InheritB(child class) a constructor for its parent class will be called implicitly. By default, the compiler looks for the zero argument constructor in the parent class. Now you have explicitly provided a constructor for Inherit class. If you hadn't, then compiler would have provided a zero argument constructor for you.
So there are 2 solutions for the program to work as described by the previous replies. One is, provide a zero argument constructor in Inherit class in addition to the already existing constructor. Second one, is by telling compiler not to look for the default zero argument constructor in parent class and call the one which you have created(using super). Since i and j will be initialized using super call, you don't have to explicitly initialize them in InheritB constructor.
If you need parameters for your constructor in the superclass, then don't add a no-parameter constructor. Put the appropriate arguments in the super() call in the subclass constructor. If you search, you can find some old threads which are helpful: here are a few which might or might not help 1, 2, 3.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com