Regarding the first question Why does it compile?
Unedited version: It does not compile
It will give a compile error since if (null = var) is not valid java code. You cannot assign something to null, you can only ever assign null to something.
You might want to use the == instead comparing var and null for equality.
Beyond that, at runtime you will get an NPE as @Ctx already correctly mentioned. The line boolean var1 = (var = null); will firstly assign null to var, then the assignment operator = will return what it has just assigned (null) and try to assign that to the boolean var1, which throws a NullPointerException.
Does it mean that is null considered as false?
Not really. Only when parsing a String which is null this is treated as false. That is basically the only place / situation.
After the edit changing null = var to var = null:
Now your code will actually compile and crash with a NullPointerException. Let's go through what happens here step by step:
Boolean var = false; — A Boolean object is created by autoboxing the boolean value false.
boolean var1 = (var = null); — The first operation is (var = null) which assigns null to var. = therefore returns null. The statement then is "equivalent" to boolean var1 = null which the compiler would reject.
Unfortunately, the compiler is not capable of deducing that the statement boolean var1 = (var = null); would always lead to the invalid assignment boolean var1 = null. The code therefore compiles fine, but crashes at runtime.
if(null=var)won't compile...if(null=var)never compile.