Possible Duplicate:
Difference between Color.red and Color.RED
I have seen that the Java class java.awt.Color contains couples of fields with the same name, once in capital letters and once not. For example: Color.black and Color.BLACK. Is there a difference?
edit:
… and if not, why are there two of them?
Just take a look at documentation:
No, there is no difference.
Both of them exist because
blackhas been introduced with theColorclass, then they realized that it wasn’t following naming convention so they added the capitalized version (you can see since 1.4 written). They didn’t remove the old ones to not break any < 1.4 code.