4 ms·
But you wouldn't do this in Java (need a random string for an integer). Instead you might see: logger.fatal( String.format("Program crashed on index %d: %s"
by msg 15y ago
But you wouldn't do this in Java (need a random string for an integer).
Instead you might see:
logger.fatal( String.format("Program crashed on index %d: %s", i, message) );
I think C has a similar construct, not quite as verbose, that would save 7 characters out of the line...
- ElliotH 15y agoThere are other methods on Integer and such - it was a contrived example because I was too lazy to read the docs.