The BFOIT Java Programming Class

Java Punctuation


Separators are Java's punctuation.  Just as periods, semicolons, question marks, pairs of parenthesis, and other punctuation add structure to written text, Java separators help the Java compiler interpret components of Java source code.


( and )
pairs of parenthesis surround:

[ and ]
pairs of square brackets surround array indicies.

{ and }
pairs of squiggly brackets surround a few things:

;
a semicolon terminates:

,
a comma is used to separate items in sets/lists:

.
a period is used to:


Back to Table of Contents