CONTENTS | PREV | NEXT Java Code Conventions


5.1 Simple Statements

Each line should contain at most one statement. Example:

argv++; argc--;                 // AVOID!
Do not use the comma operator to group multiple statements unless it is for an obvious reason. Example:

if (err) {
Format.print(System.out, "error"), exit(1); //VERY WRONG!
}


CONTENTS | PREV | NEXT
Copyright © 1997 Sun Microsystems, Inc. All Rights Reserved.