I tried to understand how exactly the return value of assignment operation works. followed by this post "Java returns the assigned value".
    boolean b1 = false, b2 = false;
    if (b2 = b1 == false) {
        System.out.println("true");
    } else {
        System.out.println("false");
    }
b2 is true because of (b1 == false) return true, then the return of b2 assignment b2 = true
Or is it because of some other reason?