Java常量定义
/** * char 类型常量 */ private static final char CHAR = 'A'; /** * byte 类型常量 */ private static final byte BYTE = 1; /** * short 类型常量 */ private static final short SHORT = 10; /** * int 类型常量 */ private static final int INT = 100; /** * long 类型常量 */ private static final long LONG = 100; /** * float 类型常量 */ private static final float FLOAT = 120f; /** * double 类型常量 */ private static final double DOUBLE = 120.00; /** * double 类型常量 */ private static final boolean BOOLEAN = true; /** * String 类型常量 */ private static final String SUCCESS = "success";
原文地址:http://blog.csdn.net/you23hai45/article/details/44837973