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

Home > Java Programming > Interface > Questions and Answers

Q: which three can be included in an interface declaration?
A. void showmessage();
public void showmessage();
private void showmessage();
B. public void showmessage();
static void showmessage();
abstract void showmessage();
C. void showmessage();
public void showmessage();
abstract void showmessage();
D. static void showmessage();
private void showmessage();
abstract void showmessage();

Answer and Explanation

Answer:void showmessage();
public void showmessage();
abstract void showmessage();

Explanation:
all the methods in an interface are by default public abstract, even if you don’t specify by default it will be public abstract

Comment on this Question

Name:

Loading...




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