Why in Color class colors like blue, red, green are used as Color.blue, Color.red and Color,green instead of Color.BLUE, Color.RED and Color.GREEN as they are static and final as per convention any specific reason
Peter Tran
Bartender
Joined: Jan 02, 2001
Posts: 783
posted
0
The only answer I can see is that someone else wrote the Color class and didn't follow the coding standard.
bhooshan iyer
Greenhorn
Joined: Jan 13, 2001
Posts: 10
posted
0
beats me!!! [This message has been edited by bhooshan iyer (edited January 18, 2001).]
Marius Holm
Ranch Hand
Joined: Sep 11, 2000
Posts: 84
posted
0
There is a sensible answer to this that I've read before, but I don't remember. But it is not an error or a convention violation. Marius
deekasha gunwant
Ranch Hand
Joined: May 06, 2000
Posts: 396
posted
0
hi , just guessing....but can it be because red/green/blue... are not primitive/String variables instead they are instances of Color class. Marius were u talking about this link...? http://www.javaranch.com/ubb/Forum24/HTML/003052.html