Question: public class Peoplepublic static void main ( Stringll args ) Person x;x = new Person ( Bill Jones ) ;x . info ( )

public class Peoplepublic static void main (Stringll args)Person x;x = new Person ("Bill Jones");x. info ();x = new Student ("John Smith") ;x. info () ;*= new Worker ("Ann Taylor");x. info () ;public class Personprotected String name;public Person (String name)this.name = name;public void info ()System. out printin (name +" is a person") ;publicclassStudent extendsPersonpublicStudent (String name)super ( name ) ;publicclass Worker extends PersonpublicWorker (String name)super (name) ;public void info ()System. out println (name +" is a worker") ;Which would be printed?A) Bill Jones is a personJohn Smith is a person Ann Taylor is a personB) Bill Jones is a personJohn Smith is a student Ann Taylor is a workerC) Bill Jones is a personJohn Smith is a person Ann Taylor is a workerD)Bill Jones is a person John Smith is a person Ann Taylor is a student

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!