Which two compile?

Which two compile?

Which two compile?

A.
interface Compilable {
void compile();
}

B.
interface Compilable {
final void compile();
}

C.
interface Compilable {
static void compile();
}

D.
interface Compilable {
abstract void compile));
}

E.
interface Compilable {
protected abstract void compile ();
}



Leave a Reply 4

Your email address will not be published. Required fields are marked *


dima

dima

as it written abstract void compile)); it doesn’t compile because of “))”

Charlie

Charlie

Method declared in Interface is implicitly public abstract.

Dylan

Dylan

A, D. Interfaces can’t have static, final or anything other than public method declarations.