Method Decleration

In a SCJP quesion it asks

Which of the following are legal method declerations?

A) protected abstract void m1();

B) static final void m1(){}

C) transient private native void m1(){}

D) synchronized public final void m1(){}

E) private native void m1();

F) static final synchronized protected void m1(){}

I think the A,B,D,E,F are legal.I am sure that C is wrong because transient can not be used in a method.But i am not sure whether we can use other method modifiers by combining(i.e static+final , private+native etc.).

So can anyone give me a explanation if i am wrong and also what sort of modifier combinations we can use.

[701 byte] By [ram102125a] at [2007-11-27 5:37:19]
# 1

Well why don't you actually test something yourself once in a while?

No one minds helping you, it's just if you intend to be a programmer then maybe you should start to write a few programs. It is not like the answer here needs anything more than a simple test class to be proved wrong or right. Run some code, think about what each modifier means and why it has generated and error when used in a certain way. You won't pass and SCJP exam in these forums.

Message was edited by:

_helloWorld_

_helloWorld_a at 2007-7-12 15:09:15 > top of Java-index,Java Essentials,New To Java...
# 2

Have a look here:

http://www.uni-bonn.de/~manfear/javamodifiers.php

And here:

http://java.about.com/library/weekly/aa_methods1.htm

And here:

http://www.unf.edu/~rzucker/cop3540dir/modifiers.html

Oh, and it's spelled "declaration", not "decleration"

Navy_Codera at 2007-7-12 15:09:15 > top of Java-index,Java Essentials,New To Java...