No, this has no purpose in Java.
In C and some related languages, it was sometimes used to avoid this error:
if (someVariable = null)
Pay attention to =, not to ==, the author has inadvertently assigned nullto someVariableinstead of checking for null. But this will lead to a compiler error in Java.
C if (someVariable = null) ( ).
, — : " 21, " ( , ). , ; , , .