|
When you were younger, you may have learned that English was composed of
seven parts of speech. Every word you'd ever write or read or say or hear was
one of the following:
|
Parts of Speech
Verbs
Nouns
Pronouns
Adjectives
Adverbs
Prepositions
Conjunctions
| | | | | | |
|
|
|
As you learn a new programming language, every recognizable symbol
within a computer program takes on a special meaning. Programmers have much
latitude in how they arrange the basic elements to develop software, but
every symbol falls into the following:
|
Basic Elements of Java
| Comments
| inline/* ... */ |
end-of-line// ... |
javadoc/** ... */ |
| | Literals
| numbers987 076 0xfedc 1.2 -3.4e5 67.8e-9 |
characters'a' '\n' \u000a |
strings"Hello" "\"quoted\"" |
| | Identifiers
| literalstrue false null |
reserved keywordspublic class static |
standard identifiersString System |
user-definedMyHello args |
operatorsnew instanceof |
| | Punctuation
| operators= + - * / % == != < >= |
separators. , ; |
grouping() [] {} |
| | | | | | | | | | | | | | |
|
|