This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interface

 
jyoti Viv
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question is if all membars of an interface are by default static final then explicitly defining them in the declaration will make any difference?
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every field declaration in the body of an interface is implicitly public, static and final. It makes no difference whether or not you use these modifiers in your declaration.

In a similar way, every interface method is implicitly public and abstract, so the following are all identical:

void go();
public void go(); // not recommended
abstract void go();
public abstract void go(); // not recommended
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic