Suppose you have two classes related by inheritance that both contain a zero-parameter method named
doIt.Here’s the subclass’s version of
doIt:
public void doIt(){ System.out.println(“In subclass’s doIt method.”); doIt() ;} // end doItThe
doIt();call is an attempt to call the superclass’s version of
doIt.
a) Describe the problem that occurs when another method calls the above
doItmethod and the
doItmethod executes.
b) How should you fix the problem?
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.