So I was testing out operators, because im helping my friend with java and i stumbled across a weird order of programming. What is happening when I run the following code
public static void main(String[] args) {
int B = 6;
//First console print out
System.out.println(B+=++B);
System.out.println(B);
B = 6;
//Second Console print out
System.out.println(B+=B++);
System.out.println(B);
}
The output for the following code is
13
13
12
12
What causes the second console B math output = 12 when it adds 6 to itself, followed by ++ (which is +1)