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?
  1. protected abstract void m1();
  2. static final void m1(){}
  3. synchronized public final void m1() {}
  4. private native void m1();
1 and 3
2 and 4
1 only
All of them are legal declarations.
Answer: Option
Explanation:

All the given statements are legal declarations.

Discussion:
14 comments Page 2 of 2.

Rocks said:   1 decade ago
What is the working of synchronize and native?

Sush said:   1 decade ago
Please anyone explain it?

Vinu said:   1 decade ago
Can any one explain ?

Sainath said:   1 decade ago
Can you explain it in detail?


Post your comments here:

Your comments will be displayed after verification.