Game Development Reference
In-Depth Information
Java Comments
Java comments can consist of single-line comments and multiline comments.
// ).
Single-line comments start with two slash characters (
// This is a single-line Java comment
/* ) and end with
Multiline comments start with a slash followed by an asterisk (
an asterisk followed by a slash ( */ ).
/*
This is
a multiline
comment
*/
Java Basic Data Types
Java data types can be numeric, character, or Boolean in nature.
byte: An 8-bit number with values from -128 to 127, inclusive
short: A 16-bit number with values from -32,768 to 32,767, inclusive
int: A 32-bit number with values from -2,147,483,648 to 2,147,483,647, inclusive
long: A 64-bit number with values from -9,223,372,036,854,775,808 to
9,223,372,036,854,775,807, inclusive
float: A single-precision 32-bit IEEE 754 floating-point number
double: A double-precision 64-bit IEEE 754 floating-point number
char: A single 16-bit Unicode character that has a range of '\u0000' (or 0) to '\
uffff' (or 65,535, inclusive)
Boolean: Having a value of either true or false
Arrays
In Java, you can create arrays of elements from the basic Java data types listed in the preceding section.
The following statement creates an array of 16 elements of type float called m_ProjectionMatrix .
float [] m_ProjectionMatrix = new float [16];
 
Search WWH ::




Custom Search