In the Java concurrency environment, why b = = (b = a) is not always true?

in Java, why does the code b = = (b = a) not always return true? in a multithreaded environment

a can be modified by multiple threads.
b initializes to b = a
when printing b = = (b = a), the result is not necessarily true.

however, isn"t the priority of the operator b = an and then b = = b?

the code is as follows:

public class Demo implements Runnable{

    public static double a = 0;

    @Override
    public void run() {
        a = Math.random()*100;
        double b = a;
        System.out.println(b == (b = a));
    }

     public static void main(String args[]) {

         for(int i=0;i<10;iPP) {
             new Thread(new Demo()).start();
         }
     }
    
}

print result:

false
true
true
true
false
true
false
true
true
true

bounded roomb does not directly compare two bs, but first puts b in a register, and then compares the values in the two registers. When the second b is put into the register, b may be modified.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32b5d-2be51.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32b5d-2be51.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?