Consider the code below. What will be output to the console? class A { public void foo() { System.out.println("I am A");
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Consider the code below. What will be output to the console? class A { public void foo() { System.out.println("I am A");
Consider the code below. What will be output to the console? class A { public void foo() { System.out.println("I am A"); } } class B C public void food) { System.out.println("I am B"); 1 public void also() { System.out.println("I am also B"); 3 3 public class Example public static void main(String[largs) { A myObject = new B(); myObject.foo(); 3 3
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!