Java Programming - Declarations and Access Control - Discussion
Discussion Forum : Declarations and Access Control - General Questions (Q.No. 18)
18.
Which is a valid declaration within an interface?
Answer: Option
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.
Discussion:
11 comments Page 2 of 2.
Bharath said:
1 decade ago
public static short stop=23; is given as correct answer but how come its possible, interface does not accept static modifiers?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers