Just out of curiosity, why are there duplicate colors, such as
Color.red and Color.RED in the java Color class? Color.RED would be
the standard notation for a static final...
Chris
Knute Johnson - 23 Aug 2007 03:04 GMT
> Just out of curiosity, why are there duplicate colors, such as
> Color.red and Color.RED in the java Color class? Color.RED would be
> the standard notation for a static final...
>
> Chris
The lower case names were in the original version of Java before they
standardized on upper case names for the static finals. The upper case
names were added in version 1.4. Use the upper case names for any new code.

Signature
Knute Johnson
email s/nospam/knute/
Roedy Green - 23 Aug 2007 03:30 GMT
>Just out of curiosity, why are there duplicate colors, such as
>Color.red and Color.RED in the java Color class? Color.RED would be
>the standard notation for a static final...
It is historical. Originally they were all lower case. Then someone
pointed out this violated the static final all upper case naming
convention, and Sun fixed it. They had to leave the lower case names
to avoid breaking existing code.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com