Jtest logo




Contents  Previous  Next  Index

NAMING.IFV


Use uppercase letters for "interface" fields

Description

This rule flags any "interface" field that has an unconventional name format.

Fields in an "interface" are always "static" and "final", so they should follow the same naming convention for named constants.

Example

 package NAMING;
 
 interface IFV {
     int max = 1000;
 }

Repair

 interface IFV {
     int MAX = 1000;
 }

Reference

Arnold, Ken, and Gosling, James The Java Programming Language. 2d ed. Addison Wesley, 1997, pp. 91-93.


Contents  Previous  Next  Index

ParaSoft logo
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft