I have the following code:
public abstract class TestAbstract {
abstract
String specialMethod();
private native void abstractMethod();
void sayHello() {
System.out.println("Hello");
}
}
It compiles fine, but I am a bit confused because I have an abstract method declaration which does not use the keyword abstract:
private native void abstractMethod();
The compiler is fine with the above decalration, but it doesnt't like the following:
String abstractMethod();
...so, why can I get away without using the abstract keyword in the first method declaration and not the second...?
Thanks!