A. The program has a compile error, because m is overridden with a different signature in B.
B. The program has a compile error, because b. m (5) cannot be invoked since the method m (int) is hidden in B.
C. The program has a runtime error on b. i, because i is not accessible from b.
D. The method m is not overridden in B. B inherits the method m from A and defines an overloaded method m in B.
+5
Answers (1)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Analyze the following code: public class Test { public static void main (String[] args) { B b = new B (); b. m (5); System. out. println ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Home » Computers & Technology » Analyze the following code: public class Test { public static void main (String[] args) { B b = new B (); b. m (5); System. out. println ("i is " + b. i); } } class A { int i; public void m (int i) { this.