What is the difference between += and =+? Specifically, in java, but in general also.
Colons and semicolons are two types of punctuation. Colons (:) are used in sentences to show that something is following, like a quotation, example, or list. Semicolons (;) are used to join two independent clauses, or two complete thoughts that could stand alone as complete sentences.
() is a tuple: An immutable collection of values, usually (but not necessarily) of different types. [] is a list: A mutable collection of values, usually (but not necessarily) of the same type.
Greater than or equal to sign: ≥ This is because ≥ does not denote a strict inequality. This is the only difference between ">" and "≥".
The first means all values greater (on the left) – but NOT including the value on the right. The second notation means that you also include the indicated value in the range.
i += 4;
means
i = i + 4; // increase i by 4.
While
i =+ 4;
is equivalent to
i = +4; // assign 4 to i. the unary plus is effectively no-op.
(See http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.15.3 for what a unary + does.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With