Java comment at end of brace/block

My take on it is that as a rule it is NOT a good practice. As always with rules there could be exceptions but very rare.

It is not a good practice because

  1. Modern editors highlight the opening bracket when you place cursor on the closing one and vice versa.
  2. Most important: if there is a possibility to not see the beginning of the clause it means that the method is huge (more than half a page) which is a bad practice.
  3. It adds noise to the code that will confuse readers who are used to more conventional Java coding style.
  4. Incorporating LordScree-Joachim Sauer comment: These comments will
    be pain in the neck to maintain. So most likely it will not be maintained and the information will usually be out of sync with reality.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)