Question: Please ans quickly C. Create and assign an object of Person using anonymous inner class for both of Line 7 and 8 to produce output

 Please ans quickly C. Create and assign an object of Person

Please ans quickly

C. Create and assign an object of Person using anonymous inner class for both of Line 7 and 8 to produce output "Hello, I'm an Engineer" from line number 10 and "Hello, I'm a Doctor" from Line number 11. 1 interface Person 2 void introduce(); 3) 4 5 public class AnnonEx 6 public static void main(String[] args) { 7 Person engineer; // Write your codes 8 Person doctor; // Write your codes engineer.introduce(); // should print "Hello, I'm an Engineer" doctor.introduce(); // should print "Hello, I'm a Doctor" } 13) 9 10 11 12 211

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!