Solution Manual for Starting Out with Java: From Control Structures through Objects, 7th Edition
Preview Extract
APPENDIX
Operator Precedence
and Associativity
B
This table shows the precedence and associativity of all the Java operators. The table is
divided into groups, and each operator in a group has the same precedence. The groups of
operators are arranged from the highest precedence at the top of the table to the lowest
precedence at the bottom of the table. For example, the first group of operators shown is:
. [] () ++ —
This group of operators has the highest precedence of all the operators; and each of these
operators has the same precedence.
Operator
Description
Associativity
.
membership
left-to-right
[]
array subscript
left-to-right
()
method argument list
left-to-right
++
postfix increment
left-to-right
—
postfix decrement
left-to-right
++
prefix increment
right-to-left
—
prefix decrement
right-to-left
+
unary plus
right-to-left
–
unary minus
right-to-left
~
bitwise complement
right-to-left
!
logical NOT
right-to-left
new
object creation
right-to-left
(type)
cast
right-to-left
*
multiplication
left-to-right
/
division
left-to-right
%
remainder
left-to-right
From Starting Out with Java: From Control Structures through Objects, Sixth Edition. Tony Gaddis.
Copyright ยฉ 2016 by Pearson Education, Inc. All rights reserved.
B-1
Z02_GADD2213_07_SE_APP2.indd 1
27/11/2017 17:40
B-2
Appendix Bโโ Operator Precedence and Associativity
Operator
Description
Associativity
+
addition
left-to-right
+
string concatenation
left-to-right
–
subtraction
left-to-right
<>
signed right shift
left-to-right
>>>
unsigned right shift
left-to-right
greater than
left-to-right
=
greater than or equal to
left-to-right
instanceof
type comparison
left-to-right
==
equal to
left-to-right
!=
not equal to
left-to-right
&
bitwise AND
left-to-right
^
bitwise XOR
left-to-right
|
bitwise OR
left-to-right
&&
logical AND
left-to-right
||
logical OR
left-to-right
?:
conditional
right-to-left
=
assignment
right-to-left
+=
combined assignment
right-to-left
-=
combined assignment
right-to-left
*=
combined assignment
right-to-left
/=
combined assignment
right-to-left
<>=
combined assignment
right-to-left
>>>=
combined assignment
right-to-left
&=
combined assignment
right-to-left
^=
combined assignment
right-to-left
|=
combined assignment
right-to-left
Z02_GADD2213_07_SE_APP2.indd 2
27/11/2017 17:40
Document Preview (2 of 419 Pages)
User generated content is uploaded by users for the purposes of learning and should be used following SchloarOn's honor code & terms of service.
You are viewing preview pages of the document. Purchase to get full access instantly.
-37%
Solution Manual for Starting Out with Java: From Control Structures through Objects, 7th Edition
$18.99 $29.99Save:$11.00(37%)
24/7 Live Chat
Instant Download
100% Confidential
Store
James Lee
0 (0 Reviews)
Best Selling
Test Bank for Strategies For Reading Assessment And Instruction: Helping Every Child Succeed, 6th Edition
$18.99 $29.99Save:$11.00(37%)
Chemistry: Principles And Reactions, 7th Edition Test Bank
$18.99 $29.99Save:$11.00(37%)
The World Of Customer Service, 3rd Edition Test Bank
$18.99 $29.99Save:$11.00(37%)
Solution Manual for Designing the User Interface: Strategies for Effective Human-Computer Interaction, 6th Edition
$18.99 $29.99Save:$11.00(37%)
Data Structures and Other Objects Using C++ 4th Edition Solution Manual
$18.99 $29.99Save:$11.00(37%)
2023-2024 ATI Pediatrics Proctored Exam with Answers (139 Solved Questions)
$18.99 $29.99Save:$11.00(37%)