Home » Java Programming » Declarations and Access Control

Which is a valid declaration within an interface?

Correct Answer: public static short stop = 23;

Explanation:

(A) is valid interface declarations.


(B) and (C) are incorrect because interface variables cannot be either protected or transient. (D) is incorrect because interface methods cannot be final or static.


← Previous Question Next Question→

More Questions from Declarations and Access Control

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion