Tuesday, June 24, 2014

Java Coding Style

Using this as a defensive measure.
Labeling Closing Braces
while(notYet != done)
{
// many lines of code go here

} // while(notYet != done)

The Infamous Double Equals
the compiler isn’t smart enough to realize that
boolean thisValue = true;
if(thisValue = true)
put all constant expressions on the left-hand side for consistency because it can be all too easy to overlook the typographical error.

No comments:

Post a Comment