No there is no coding mistake. Only there has to be return type for method doSomething() as void.
Login to rate this answer.
santhosh
Answered On : Feb 23rd, 2012
In the main method,you simply change the "base d" as "Derived d" you get "object" and "int" as a output.also returned type is required.
Login to rate this answer.
final method can be overload but cannt override
Login to rate this answer.