String.format
String#format.java
String formated = String.format("ich%s.", "Taro");
MassageFormat#format
Message#format.java
String template = "ich{0}ist.";
String formated = MessageFormat.format(template, "Taro");
Massageformat ist viel schneller.
API | 10,000 Mal ausführen | 100,000 Mal ausführen |
---|---|---|
String#format | 0.2269983S | 1.2679988S |
Message#format | 0.0730008S | 0.2999999S |
Recommended Posts