One difference between human languages and programming languages is that programming languages tend to use a lot more punctuation marks and symbols than we do in normal written English.
In order to be able to talk about Java code you will need to know the names for the marks we use. Here is a list of the marks you will need to know and the names I will use for them.1
() |
parentheses, parens |
{} |
curly braces, braces |
[] |
square brackets, brackets |
"" |
quotes, double quotes, quotation marks |
, |
comma |
; |
semicolon |
+ |
plus sign, addition |
- |
minus sign, dash, subtraction |
* |
asterisk, star, multiplication |
/ |
slash, forward slash, division |
% |
percent sign, remainder |
& |
ampersand, and |
| |
pipe, or |
! |
exclamation point, not |
= |
equals sign |
> |
greater than sign |
< |
less than sign |
'' |
single quotes |
<> |
angle brackets (when used in pairs) |
: |
colon |
_ |
underscore |
\ |
backslash |
? |
question mark |
@ |
at sign |
# |
pound sign, octothorpe |
$ |
dollar sign |
~ |
tilde |
` |
backtick, backquote |
^ |
caret |
Heres' where you can find all these puctuation marks and symbols on a standard US keyboard.
For the marks that are used in pairs, ((), {}, [], and <>) , the first one can be referred to as the “open” whatever it is and the second one the “close” whatever it is. So { is an “open brace” and } is a “close brace”. Sometimes we also use "left" and "right" as in "left paren" ( and "right paren" ).
Note also that in code we always use plain quotation marks: "" and ''. Sometimes tools like Google docs will replace those quote marks with “typographical” or “curly” quotation marks like: “” or ‘’. Depending on the font the difference may be more or less obvious. If you paste those kinds of quotes into your code it will not work.
1 Across the world of programmers there is a fair bit of variation in what people call the different punctuation marks so as you go out into the world you may meet people who use different names (especially if you meet any British programmers). I have also attempted to standardize the names in CSAwesome/BHSawesome; if you find places where the text uses different names, please let me know.