Java Programming - Declarations and Access Control - Discussion
Discussion Forum : Declarations and Access Control - General Questions (Q.No. 7)
7.
Which of the following is/are legal method declarations?
- protected abstract void m1();
- static final void m1(){}
- synchronized public final void m1() {}
- private native void m1();
Answer: Option
Explanation:
All the given statements are legal declarations.
Discussion:
14 comments Page 2 of 2.
Manohar said:
1 decade ago
static final void m1(){}
Can anyone explain it clearly?
Can anyone explain it clearly?
Kaustubh Kaley said:
1 decade ago
Why are {} specified in the declaration?
Amaziane said:
1 decade ago
I have some doubt that the declaration protected abstract void m1();
Compile, at least in my workspace with jdk7.
Compile, at least in my workspace with jdk7.
Karthik said:
10 years ago
Can you explain it clearly?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers