Multiple choice technology programming languages

Correct way of method declaration within interface :

  1. void run();

  2. protected void go();

  3. public abstract set();

  4. none of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Interface methods in Java are implicitly public and abstract, making void run(); a perfectly valid declaration. Using the protected modifier is illegal for interface methods, and public abstract set(); is invalid because it fails to specify a return type.