3.5. Variable Assignment and Initialization

There are a few conventions used in initializing variables, and some rules.

3.5.1. Naming Requirements

When you create a new variable, your naming of the variable must follow these rules:

  • The first character can be a dollar sign ($), an underscore (_), or a letter (A–Z or a–z).

  • Characters following the first character can be any of the above or a numeric character (0–9).

  • Java is case sensitive (iscurrent is not the same as isCurrent).

  • You cannot name a variable using a Java keyword.


ColdFusion is not case sensitive—Java is!

3.5.2. Java Keywords

The Java keywords, which are reserved and therefore may not be used to, for instance, name variables, are shown in Table 3.6.


Many of the keywords, such ...

Get Java™ for ColdFusion® Developers now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.