Månad: juli 2008

Java and C#

After my summer vacation I´m gonna change platform to java for a while. I have never worked as a java developer before so it will be interesting and filled with anxiety. The first thing I have started with is to look at our coding guidlines for writing java code.

The rule of placing braces

//Microsoft C# style
private int Calculate(int a, int b)
    return a * b;

//java style
private int calculate(int a, int b) {
    return a * b;

"This rule has always been discussed. And some developers feel that it’s up to them to decide where they should put the brace. This is however not the case, follow the guideline."

Our guildline tells us to use java style(suprise!), I prefered that style also, for some reason most Microsoft developers don´t. Wich one do you prefer?