Welcome Guest | Sign in | Register
Abstract - Discussion Page For Q.2522 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Abstract > Questions and Answers

Q:
Given:
interface DoStuff2 {
float getRange(int low, int high);
}
interface DoMore {
float getAvg(int a, int b, int c);
}
abstract class DoAbstract implements DoStuff2, DoMore {
}
class DoStuff implements DoStuff2 {
public float getRange(int x, int y) {
return 3.14f;
}
}
interface DoAll extends DoMore {
float getAvg(int a, int b, int c, int d);
}


What is the result?
A. The file will compile without error. B. Compilation fails. Only line 7 contains an error.
C. Compilation fails. Only line 12 contains an error. D. Compilation fails. Only line 13 contains an error.
E. Compilation fails. Only lines 7 and 12 contain errors.

Answer and Explanation

Answer:The file will compile without error.

Explanation:
As syntax is correct the above program will compile successfully.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.