Layout
convention: blank lines
Leave a blank line between the declaration
of a variable and a non-declaration statement that follows. The helps the
human reader of the program distinguish between variable declarations and
other kinds of program statement.
Java (like most modern programming
languages) ignores blank lines.
loat
discountTicketRage;
int
age;
System.out.println("Please
enter your age");
With such a blank line a program might
look as follows:
float
discountTicketRage;
int
age;
System.out.println("Please
enter your age");
With a blank line inserted after the declaration
of the last variable, it is easier to see where the 'action' starts.
Back
to top
RITSEC - Global Campus
Copyright © 1999 RITSEC- Middlesex
University. All rights reserved.
webmaster@globalcampus.com.eg
|