//My normal methods, notice that there are no extra lines between
//opening and closing brackets.
public void doStuff(String blah) {
System.out.println(blah);
}
//Methods that have code in them that take up three or more lines
//They will have new lines between opening and closing brackets.
public int calculateTotal(int one, int two) {
System.out.println(one);
System.out.println(two);
return one + two;
}
//If statements, I always put a space after if()
if (thisHappens) {
//doThis;
}
Now share some of your coding habits.

New Topic/Question


MultiQuote






|