Created
November 28, 2015 07:50
-
-
Save jukbot/28f17be9850b815044aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JukIsNull { | |
private String name; | |
public void setName (String name) { | |
if(name == null ) { | |
String name2 = "JukHappy"; | |
} | |
this.name = (name == null) ? name : name2; // <<-- check that is null? | |
} | |
} | |
// String = ""; <<-- Empty string | |
// String s2; <<-- null too | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment