Page 1 of 1

Consider the code below. What will be output to the console? class A { public void foo() { System.out.println("I am A");

Posted: Mon May 02, 2022 11:47 am
by answerhappygod
Consider The Code Below What Will Be Output To The Console Class A Public Void Foo System Out Println I Am A 1
Consider The Code Below What Will Be Output To The Console Class A Public Void Foo System Out Println I Am A 1 (47.01 KiB) Viewed 177 times
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