import java.text.*; import java.util.*; public class BenytMessageFormat { public static void main(String[] args) { // {0} {1} {2} {3} {4} Object[] parm = { new Date(), "A", new Double(0.75), new Integer(2), new Integer(5) }; String[] s = { "Klokken {0,time} d. {0,date} var der {4} tilhørere i sal {1}.", "Klokken {0,time,short} d. {0,date,long}.", "Klokken {0,time,h:mm a} d. {0,date,short}.", "Samlet pris: {2,number,currency}.", "Avance: {2,number,percent}.", "Der kom {2,choice,0#ingen!|1#en person|2#to personer|2<{2} personer}.", "Der kom {3,choice,0#ingen!|1#en person|2#to personer|2<{3} personer}.", "Der kom {4,choice,0#ingen!|1#en person|2#to personer|2<{4} personer}.", }; for (int i=0; i