Java: String format example
June 16, 2010 21:24:38 Last update: June 16, 2010 21:24:38
More arguments than format specifiers (place holders) are allowed but not vise versa.
public class TestStringFormat { public static void main(String[] args) { System.out.println(String.format("%s", "a", "b", "c")); System.out.println(String.format("%s%s", "a", "b", "c")); System.out.println(String.format("%s%s%s", "a", "b", "c")); System.out.println(String.format("%s%s%s%s", "a", "b", "c")); } }
Easy email testing with http://www.ximailstop.com