Skip to content

Instantly share code, notes, and snippets.

@sidharthkuruvila
Created August 21, 2011 11:43
Show Gist options
  • Save sidharthkuruvila/1160504 to your computer and use it in GitHub Desktop.
Save sidharthkuruvila/1160504 to your computer and use it in GitHub Desktop.
Handling null in java
String value = canReturnNull();
if(value != null)
println(value);
else
println("I'm saying nothing");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment