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

Rule:  Design43Checked automatically with code checker

Synopsis:Declare members privately
Language:Java
Severity Level:3
Category:Design


Description:

Class members should be declared privately to make sure data is not directly accessible from outside the class.

class Design43 {
  public string bar;  // bad
  protected string bar2; // bad too
  private string bar3; // allowed
  public final static int BAR = 0; // allowed 
}