Last time we discussed some basic concepts related to object-oriented programming. Two major ideas we defined were objects and variables. In this article, we will continue our discussion of variables by explaining how they hold and interact with data.
Java likes to separate the men from the boys, the hair from your head, and the code that you write. To do this, we use separators (didn't see that coming did you?).
Below is a list of separators and their functions.
How it Looks
Separates package names from subpackages and classes. Can also be used to separate a variable or method from a reference variable.
Separates identifiers when declaring variables.
No not for your teeth. Contains the values of initialized arrays. Also for declining a block of code, classes, methods, local scopes.
For declaration of array types or dereferencing array values.
Holds lists of parameters in method definition, defining precedence in expressions, holding expressions in control statements, and encasing cast types
As part of its diverse vocabulary, Java has 49 reserved keywords. These keywords cannot be used to name a variable, class, or method, and will not magically open doors (rely on good ole' "open sesame" for that one). You want to see what they look like in a table? Well here they are:
That concludes this episode of Beginning Java Programs. In the next article we will discuss Operators and putting those lazy variables to work.