Game Development Reference
In-Depth Information
Reference Data Types: Objects and Arrays
(OOP languages also have reference data types , which provide a reference in memory
to another structure containing a more complex data structure, such as an object or an
array . These more complex data structures are created using code; in the case of Java,
this is a class. There are Java Array classes of various types that create arrays of data
(such as simple databases) as well as the constructor method in a Java class, which can
create the object structure in memory, containing both Java code (methods) and data
(fields).
Java Operators: Manipulating Data in
the Application
In this section, you will learn about some of the most commonly used operators in the
Java programming language, especially those that are the most useful for programming
games. These include arithmetic operators, used for mathematical expressions; rela-
tional operators, used to ascertain relationships (equal, not equal, greater than, less
than, and so on) between data values; logical operators, used for boolean logic; assign-
ment operators, which do the arithmetic operations and assign the value to another
variable in one compact operation (operator); and the conditional operator , also called
a ternary operator, which assigns a value to a variable, based on the outcome of a true
or false (boolean) evaluation.
Search WWH ::




Custom Search