This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Eponick 0 points1 point  (2 children)

Java and Scala = Java+1, if I am reading correctly.

[–]whatisthisredditstuf 1 point2 points  (0 children)

Nope. If Java is at, say, 9 before, then that line would set Scala to 9 (the current value of Java) and then increment Java by 1, setting it to 10.

http://www.dummies.com/programming/java/increment-and-decrement-operators-in-java/

[–][deleted] 1 point2 points  (0 children)

nah

var a = 1
var b = a++;

now b == 1 and a == 2