java 8 using $ to include variables in string code example Example: java variable in string String string = String.format("A string %s", aVariable);