Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 1st, 2012  |  syntax: None  |  size: 0.79 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. left open parenthesis messes up my string buffer
  2. patAge.append(" ")
  3.       .append("(")
  4.       .append(patientDetails.getAge())
  5.       .append(" ")
  6.       .append(bpt.get("BPT_YRS"))
  7.       .append(")");
  8.        
  9. patAge.append(" ")
  10.       .append("{")
  11.       .append(patientDetails.getAge())
  12.       .append(" ")
  13.       .append(bpt.get("BPT_YRS"))
  14.       .append(")");
  15.        
  16. patAge.append(" ")
  17.       .append(patientDetails.getAge())
  18.       .append(" ")
  19.       .append(bpt.get("BPT_YRS"))
  20.       .append(")");
  21.        
  22. Object[] arguments = {
  23.          new Integer(7),
  24.          new Date(System.currentTimeMillis()),
  25.          "a disturbance in the Force"
  26.      };
  27.  
  28. String result = MessageFormat.format(
  29.          "At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
  30.          arguments);