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

Rule:  Design10Checked automatically with code checker

Synopsis:This final field could be made static
Language:Java
Severity Level:4
Category:Design


Description:
If a final field is assigned to a compile-time constant, it could be made static, thus saving overhead in each object at runtime.
public class Foo {
 public final int BAR = 42; // this could be static and save some space
}