javaadvent.com
Five Golden Backticks - JVM Advent 2018
Five Kinds of Strings Ever since Java 1.0, we’ve had string literals "like this". What other strings might we want? Other programming languages give us: Expression interpolation: s"I am ${age - 10} years old." Interpolation with formatting: f"Price: $price%8.2f" Strings with internal syntax that is checked at compile time: r"[0-9]+([.,][0-9]*)? or xml"The Java …