Question: (JAVA Quiz) Need help asap! 30 Minute Java quiz! Given the following two classes, public class Item { public void p1() { System.out.print(property 1); public
(JAVA Quiz) Need help asap! 30 Minute Java quiz!

Given the following two classes, public class Item { public void p1() { System.out.print("property 1"); public void p2() { System.out.print("property 2"); public String toString() { return "item info"; public class Book extends Item { public void p1() { super.p1(); System.out.print(" of book"); // there is a space before "of" and the following segment of code in a driver: Item oneitem = new Item(); Book onebook = new Book(); What is the output of this segment of driver code? Assume relevant code is assembly properly in a project. System.out.println(oneitem): oneitem.p10; oneitem.p20; System.out.println(onebook): onebook.p10; onebook.p20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
