(a)
// Create an object array
Object args[] = { "File not found.", new Integer(2) };
// Format the message
System.out.println(
java.text.MessageFormat.format("Error: {0} (Code {1})",args));
(b)
System.Console.WriteLine("Error: {0} (Code {1})", "File not found.", 2);