Uppercase constants in Java

This question is about why constants in Java are uppercase by convention make me think of examples of counter examples.

I can think of at least one ( Double.NaN). Are there any others?

+5
source share
6 answers

There are many serialVersionUID!

Others are ResultSetMetaDatalike columnNoNulls, columnNullable...
DatabaseMetaDataand ICC_Profilehave many mixed constants.

Here is a list with most, if not all, JavaSE constants: Constant field values

+4
source

, public final static PrintStream out (in java.lang.System.out). , System.OUT.println .

, :

private static final Logger logger = Logger.getLogger(MyClass.class);

. , , :

, static, , final, , .

+7

, , , .. java.awt.Color.

, java.awt.Color (, BLACK, RED, GREEN ..) .

+2

java.util.logging.Logger.global -

+2

null, true false. , , , , , 0x00, 0x01 0x00 .

0

length .

Btw, , "" , - , ; . UPPERCASE, .

0

All Articles