This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding Constant Interface  RSS feed

 
surya.raaj prakash
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

Can please explain to me,How constant interface would unnecessarily affect the public API of a class?
 
Vinoth Kumar Kannan
Ranch Hand
Posts: 276
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you mean 'interface for constants' by 'constant interface' ?
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think you are saying about interface.

which is always public and abstract and variable inside it are also public static final.because they are fixed and not supposed to change by the class which is going to be implement he interface
 
Campbell Ritchie
Sheriff
Posts: 53747
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Google for constant interface anti-pattern; this, which I haven't read, is the first hit.
 
Muhammad Khojaye
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Please Google for constant interface anti-pattern; this, which I haven't read, is the first hit.

Also this might be useful after reading constant interface anti-pattern.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!