Correct way of method declaration within interface :
-
void run();
-
protected void go();
-
static void get();
-
public abstract set();
-
none of these
A
Correct answer
Explanation
In Java interfaces, methods are implicitly public and abstract. Thus, void run(); is a valid declaration. Option two is invalid because interface methods cannot be protected. Option three is invalid because static interface methods require a body. Option four is invalid because it lacks a return type.