TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  Design39Checked automatically with code checker

Synopsis:An Interface should be used only to model a behaviour; consider converting this to a class
Language:Java
Severity Level:3
Category:Design


Description:
An interface should be used only to model a behaviour of a class: using an interface as a container of constants is a poor usage pattern. The static import feature should always be considered as a replacement for this practice.
public interface ConstantsInterface {
     public static final int CONSTANT1=0;
     public static final String CONSTANT2="1";
    }