Changed the scala string syntax formatting code to Java.