1. Write the output of these code block without running (1) class Person{ public Person () { System.out.println("hi!");
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
1. Write the output of these code block without running (1) class Person{ public Person () { System.out.println("hi!");
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 (); }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!