Alex Rivera | Logout

Why declare an interface as abstract?

Asked 2010-01-25T17:29:51.500
53

What's point of declaring an interface as abstract? Same thing for an interface method. Is there a point to it?

eg.

public abstract interface Presenter {
 public abstract void go(final HasWidgets container);
}
Edit
Report

2 Answers

29

Interfaces and interface methods are implicitly abstract even if not declared as so. So there is no need to explicitly specify it.

answered 2010-01-25T17:33:02.773
0

I think just verboseness, explicitness and consistency with the class syntax and semantics...

You don't have to, but maybe it could help if some reader of your code is distracted or not very versed in Java.

answered 2010-01-25T17:34:04.790

Your Answer