Category Archives: Formatting

The costs of String concatenation (+) or what String appending really does

String concatenation (e.g. “fu” + “bar”) are for most developers a mystery what it really does. The simple case Something like will usually be appended at compile time. So if you decompile this you see: The final case What happens … Continue reading

Posted in common practice, Formatting, Java, Performance | Tagged , , , , | Leave a comment

SimpleDateFormat in multithreaded environment

SimpleDateFormat is wide known in Java as the default tool to convert a String to a (java.util.)Date and vice versa. Usually you would think you can make a SimpleDateFormat static, like: Because we think, that the formatter just contains the … Continue reading

Posted in Formatting, Java, Multi threading | Tagged , , , , | 1 Comment