Skip to content

Instantly share code, notes, and snippets.

@oscarryz
Created June 2, 2011 20:02
Show Gist options
  • Save oscarryz/1005174 to your computer and use it in GitHub Desktop.
Save oscarryz/1005174 to your computer and use it in GitHub Desktop.
Compare:
"This is the %d time we talk about %s ".%( 2, "dinner" )
To:
String.format("This is the %d time we talk about %s ", 2, "dinner");
The former is more OO ( imho of course )
While:
"This is the %d time we talk about %s ".format( 2, "dinner" )
Says it wrong: "format 2 and dinner" ... but to what?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment