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 argsPerson 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 namethisname name;public void info System out printin name is a person" ;publicclassStudent extendsPersonpublicStudent String namesuper name ;publicclass Worker extends PersonpublicWorker String namesuper 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 workerDBill 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
