
Untitled
By: a guest on
Jul 1st, 2012 | syntax:
None | size: 0.79 KB | hits: 14 | expires: Never
left open parenthesis messes up my string buffer
patAge.append(" ")
.append("(")
.append(patientDetails.getAge())
.append(" ")
.append(bpt.get("BPT_YRS"))
.append(")");
patAge.append(" ")
.append("{")
.append(patientDetails.getAge())
.append(" ")
.append(bpt.get("BPT_YRS"))
.append(")");
patAge.append(" ")
.append(patientDetails.getAge())
.append(" ")
.append(bpt.get("BPT_YRS"))
.append(")");
Object[] arguments = {
new Integer(7),
new Date(System.currentTimeMillis()),
"a disturbance in the Force"
};
String result = MessageFormat.format(
"At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
arguments);