<< Chapter < Page | Chapter >> Page > |
Card 8 / 9:
variable
A memory location to hold a particular value of a given type. In a strongly-typed language such as Java, all variables must have a type. This is not true in all languages however. In a Java program, variables have names called indentifiers, which are sequences of characters put together according to the following rule. A must begin with an alphabet character (e.g. 'a', 'b', 'X', 'Y', etc.) and may be followed by zero or more alphabet characters and/or digit characters (e.g. '0', '1', etc.) and/or the underscore character ('_'). For examples, cp3PO is a valid variable name while Darth Vader is not because it has a blank character between the 'h' and the 'V'.
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | ↑ / ↓ / Return / Space |
Notification Switch
Would you like to follow the 'Principles of object-oriented programming' conversation and receive update notifications?