Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


2. Omitting parentheses around method arguments when not appropriate

Better use paranetheses parentheses for argument lists unless you are sure.
For instance, a left paranthesis parenthesis after a method name must always enclose the parameter list.


This may cause the compiler to to assume a complete statement although it is meant as continuing in the next line. It is not always as obvious as in the following Exampleexample.

Code Block
myVariable = "This is a very long statement continuing in the next line. Result is="
    + 42             // this line has no effect

4. Forgetting to write the second equals sign of the equals operator

As a rsultresult, a comparison expression turns into an assignment.