All of these (except "abstract") are meaningless in an interface, which is why they aren't allowed. An interface has only method declarations, not actual method implementations. [ November 01, 2002: Message edited by: Ron Newman ]
The synchronized and native modifiers specify implementation details that an overriding method is free to change. For example, you can override a synchronized method with a non-synchronized method and a native method can be overridden with a non-native method. Since the superclass can not enforce an implementation detail such as synchronized and native it doesn't make any sense to allow the use of such modifiers in an abstract method declaration. The "final" modifier can not be used within an abstract method declaration because it would prevent the implementation of the method in a subclass. An instance method in a superclass can be overridden by a method in the subclass that shares the same signature. The reference to an instance method is resolved at run time. A reference to an abstract superclass or interface will reference the subclass implementation of an abstract method. The same is not true for static methods. A static subclass method does not override a superclass method. Instead, the subclass method hides the static superclass method. Rather than resolve the method reference at run time, a reference to a static method is resolved at compile time. Consequently, a reference to an abstract super class will reference the superclass method. If the method were both static and abstract, then no implementation of the method would be available. For that reason, static methods may not be abstract.
Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>
Joined: Jul 21, 2002
Thanks Dan and Ron, now I understand the reason, not just remember the rules.