Relative Content

Tag Archive for javalocalejava-15

Java 15 String.formatted(args): safe for locale-aware usage?

In Java prior to version 15, the most straightforward way of formatting a string was to use String.format(Locale, String, args) method. It was also considered a best practice to put Locale.ROOT as the locale there (unless you want a specific locale to be used) instead of the default one that could cause issues that are hard to debug.