java - Is there an equivalent of x++ that can be used in an expression for incrementing by values greater than 1? -
Apologies for a slightly misleading title.
It is well known that
int x = 4; Println (x ++); // print 4 x = 4; Println (++ x); // print 5 using , I found that
int x = 4; Println (x + = 4); // print 8 Will one increase in the above analog X but instead 4 print? Like other assignment operators, the shortcode assignment returns the final value, like
.
This lets you type
x = y = z + = 4; There is no post-shorthand operator that gives original value.
Comments
Post a Comment