sort given set of colors in VIBGYOR order

Posted by Vijay Selvaraj on Stack Overflow See other posts from Stack Overflow or by Vijay Selvaraj
Published on 2010-06-09T11:57:23Z Indexed on 2010/06/09 12:02 UTC
Read the original article Hit count: 316

Filed under:
|
|

Hi, how do i order a given set of colors from the rainbow in VIBGYOR order. say i input the seven colors in the following order { red, blue, green, yellow, indigo, violet, orange} and i should print the output as {violet, indigo, blue, green, yellow, orange, red}, irrespective of the order i give the output should be as above. Can someone suggest me about implementing this in java program?
Thanks,
-Vijay

© Stack Overflow or respective owner

Related posts about java

Related posts about beginner