Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
The Java programming language also supports the operators in the next table.
Other Operators Operator Use Description ?:
op1 ? op2 : op3
If op1
istrue
, returnsop2
; otherwise, returnsop3
[]
See Creating and Using Arrays Used to declare arrays, to create arrays, and to access array elements .
See Using Objects Used to form long names (
params)
See Defining Methods Delimits a comma-separated list of parameters (
type)
(
type) op
Casts (converts) op
to the specified type; an exception is thrown if the type ofop
is incompatible with typenew
See Using Objects and Creating and Using Arrays Creates a new object or array instanceof
op1 instanceof op2
Returns true
ifop1
is an instance ofop2
Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.