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

Rule:  Design26Checked automatically with code checker

Synopsis:Class cannot be instantiated and does not provide any static methods or fields
Language:Java
Severity Level:1
Category:Design


Description:
A class that has private constructors and does not have any static methods or fields cannot be used.
/* This class is unusable, since it cannot be
 instantiated (private constructor),
 and no static method can be called.
 */
public class Foo {
 private Foo() {}
 void foo() {}
}