This week's book giveaway is in the Android forum. We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line! See this thread for details.

There is a collection of 5 hats,of different style and colours,A Person goes on Travel,while on Travel he has chose & wear a hat such that the hat is of different style only, and the colour of the hat has to be different/repeated.Write a java algorithm for chosing such a hat ?

When The Going Gets Tougher,The Tougher gets Going

Deepak Lal wrote:There is a collection of 5 hats,of different style and colours,A Person goes on Travel,while on Travel he has chose & wear a hat such that the hat is of different style only, and the colour of the hat has to be different/repeated.Write a java algorithm for chosing such a hat ?

my good man , your English is bad. Please use the translation tool from google , and read its result then correct it if necessary , then post it here.

Your question sound interesting , but I cannot fully understand it from your post.

I think java algorithm means and algorithm that is optimized by the use of java - this could be a tricky and fun riddle to solve.
Please post the question again , you made me curious.