• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding Constant Interface

 
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
Pie
Posts: 50278
80
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic