File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Regarding Constant Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Regarding Constant Interface" Watch "Regarding Constant Interface" New topic
Author

Regarding Constant Interface

surya.raaj prakash
Ranch Hand

Joined: Oct 30, 2009
Posts: 76
Hi Friends,

Can please explain to me,How constant interface would unnecessarily affect the public API of a class?
Vinoth Kumar Kannan
Ranch Hand

Joined: Aug 19, 2009
Posts: 276

do you mean 'interface for constants' by 'constant interface' ?


OCPJP 6
Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

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


SCJP6.0,My blog Ranchers from Delhi
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38046
    
  22
Please Google for constant interface anti-pattern; this, which I haven't read, is the first hit.
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

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.


http://muhammadkhojaye.blogspot.com/
 
Consider Paul's rocket mass heater.
 
subject: Regarding Constant Interface
 
Similar Threads
how to access a constant from JSTL
A member interface is implicitly static
Document or not? gazillion public constants in one class
best approach to map constant values
switch/case statement - compilation error even with final.