I read that primitive datatypes like boolean, byte, short, char, int and float are atomic. 64-bit datatypes like long and double are not.
But what does this mean? When I have 2 Threads that increment and decrement on a int variable than sometimes i still got race conditions.
for example the bytecode of adding an amount to a variable.
getfield #2 <Field int amount>
iload_1
iadd
putfield #2 <Field int amount>
Is atomic in this case every single operation (getfield, iadd...) and not the full addition?