Quote:
Originally Posted by Mr_love_monkey
With java the sun coding standards say you should have the braces even if it's just one line.
Though that said they also say you should avoid the compound if statement because some programmers find it hard to understand - my opinion is if you can't understand it then you shouldn't be a programmer...
|
I find it's a space thing, if it's one line it's just ugly.
Code:
if (ProductType == ProductType.Software)
{
// do something
}
else
{
//do something else
}
or
Code:
if (ProductType == ProductType.Software)
// do something
else
//do something else
Anyhoo, The Monty Hall Problem was good. I think one like that a month would be good for a monthly challenge. Any word on that Rob?