Skip to content

Instantly share code, notes, and snippets.

@rmw
Created November 29, 2011 22:31
Show Gist options
  • Save rmw/1406893 to your computer and use it in GitHub Desktop.
Save rmw/1406893 to your computer and use it in GitHub Desktop.
What is the primary difference between these two pieces of code?
// Java
public boolean isEmpty(String s) {
return s.length() == 0;
}
# ruby
def empty?(s)
return s.size == 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment