Question: What is the output of the Encyclopedia program? A. Reading is fun!-papyrus B. Reading is fun!-cellulose C. null-papyrus D. null-cellulose E. The code does not
What is the output of the Encyclopedia program?

A. Reading is fun!-papyrus
B. Reading is fun!-cellulose
C. null-papyrus
D. null-cellulose
E. The code does not compile.
F. None of the above.
package paper; abstract class Book { protected static String material = "papyrus"; public Book() {} abstract String read() {} public Book (String material) {this.material = material; } } public class Encyclopedia extends Book { public static String material = "cellulose"; public Encyclopedia() { super(); } public String read() { return "Reading is fun!"; } public String getMaterial() {return super. material; } } public static void main(String[] pages) { System.out.print(new Encyclopedia ().read()); System.out.print("-" + new Encyclopedia ().getMaterial()); }
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
To determine the output of the program lets analyze the code step by step 1 The program defines an a... View full answer
Get step-by-step solutions from verified subject matter experts
