Page 1 of 1

Would you attempt all 3 questions please?

Posted: Mon Jun 06, 2022 6:52 pm
by answerhappygod
Would you attempt all 3 questions please?
Would You Attempt All 3 Questions Please 1
Would You Attempt All 3 Questions Please 1 (20.04 KiB) Viewed 26 times
Would You Attempt All 3 Questions Please 2
Would You Attempt All 3 Questions Please 2 (21.12 KiB) Viewed 26 times
1. Write the output of these code block without running (1) class Person ( public Person () { System.out.println("hi!"); } public Person (String s) { this (): System.out.println("I am "+s); } } public class Who extends Person ( public Who () { this ("I am Tony"); } public Who (String s) { super (s); System.out.println("How do you do?"): } public static void main(String args[]) { Who w = new Who (): }

(2) public class TestDemo { int m-5: public void some (int x) { IIFX: ) public static void main(String args[]) { new Demo (). some (7): } } class Deno extends TestDemo { int m=8; public void some (int x) { super. some (x); System.out.println (m): (3) abstract class Base ( abstract public void myfunc(); public void another() { System.out.println("Another method"); public static void main(String args[]) { Abs a = new Abs(): a. amethod(): public void my func(){ System.out.println("My Func"); } public void amethod() ( my func(); public class Abs extends Basel