Originally posted by Hemant Gupt: ...this Code give me an error can any one explain me.. why compiler come up with error ?
I think the error messages are pretty clear:
illegal combination of modifiers: abstract and private [in] private abstract void m1();
AS.AB is not abstract and does not override abstract method m1() in A
If a method is abstract, that means the implementation will be provided is a subclass. But if a method is private, then it cannot be overridden. Therefore, abstract and private cannot be used together on a method.
If a class extends an abstract class, then it must either provide implementation for any abstract methods it inherits or be declared abstract itself. [ June 16, 2008: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org