4 ms·
In Java, at least, it can be useful when the value you are comparing a String constant with can be null: if("test".equals(environment)){ vs if(environment !=
by suresk 14y ago
In Java, at least, it can be useful when the value you are comparing a String constant with can be null:
if("test".equals(environment)){
vs
if(environment != null && environment.equals("test")){