0% found this document useful (0 votes)
31 views1 page

22 - PDFsam - 8. OOPs

The document summarizes questions and answers from a SCJP exam preparation material. It contains one multiple choice question that asks about the result of an interface inheritance hierarchy. The question defines an abstract class that implements two interfaces, a class that implements one of those interfaces, and a new interface that extends one of the original interfaces. The answer is provided that compilation fails.

Uploaded by

ROHIT JAIN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views1 page

22 - PDFsam - 8. OOPs

The document summarizes questions and answers from a SCJP exam preparation material. It contains one multiple choice question that asks about the result of an interface inheritance hierarchy. The question defines an abstract class that implements two interfaces, a class that implements one of those interfaces, and a new interface that extends one of the original interfaces. The answer is provided that compilation fails.

Uploaded by

ROHIT JAIN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

DURGA’s SCJP Material

A. Compilation fails.
B. Cannot add Toppings
C. The code runs with no output.
D. A NullPointerException is thrown in Line 4.
Answer: A

Q: 36 Given:
1. interface DoStuff2 {
2. float getRange(int low, int high); }
3.
4. interface DoMore {
5. float getAvg(int a, int b, int c); }
6.
7. abstract class DoAbstract implements DoStuff2, DoMore { }
8.
9. class DoStuff implements DoStuff2 {
10. public float getRange(int x, int y) { return 3.14f; } }
11.
12. interface DoAll extends DoMore {
13. float getAvg(int a, int b, int c, int d); }
What is the result?
DURGASOFT, # 202,2nd Floor,HUDA Maitrivanam,Ameerpet, Hyderabad - 500038,  040 – 64 51 27 86,
80 96 96 96 96, 9246212143 | www.durgasoft.com Page 22

You might also like