Which of the following modifiers can not be used with the abstract modifier in a method declaration?
a. final
b. private
c. protected
d. public
e. static
f. synchronized
g. native
You cannot use these modifiers because...
1.
final: ...an abstract method has to be implemented, so, declaring it
final is pointless and contradictory;
final means complete,
abstract means incomplete.
2.
static: ...the
static methods are not inherited and therefore you cannot override a
static method, you can hide it, but not override it, so once again it would be pointless.
3.
synchronized and
native: ...these modifieres are implementation specific. You can override an
abstract method using this modifiers, but it does not make any sense to declare a
abstract method
syncrhonized or
native, because you have not provided an implementation for the method yet.
4.
private: ...you cannot declare a mehtod
abstract and
private at the same time, because a
private method cannot be inherited and therefore cannot be implemented.
[ April 27, 2005: Message edited by: Edwin Dalorzo ]