boolean rhs; rhs = value == null; Specifically, the part I don't understand is the = operator followed by value followed by ==. What does that mean?
Since comparing == has higher priority than = assigning, code
rhs = value == null; is the same as
rhs = (value == null); So it will check if value is null and store result of that test in rhs.
This is the simple way to check whether the the value is null or not. If null then is will assign true to rhs, else false. You can try it by your self using following code:
String value = null; String value2 = "Testing"; boolean rhs; System.out.println(rhs=value == null); //print true System.out.println(rhs); System.out.println(rhs=value2 == null);//print false System.out.println(rhs);
if (value == null) rhs = true; else rhs = false, but just shorter...