what is different between %s and %0s?(%s和%零s) %s prints the string as it is with spaces at the begining if string contentsare less than string variable size.whereas %0s supress printing spaces. (如果字符串的内容小于字符串变量的尺寸,%s打印字符串时前面会添加空格:而%0s不会添加空格(字符串顶头打印))
public class Test2 { static { System.out.println("1"); } { System.out.println("2"); } public Test2() { System.out.println("3"); System.err.println("3"); } public static void main(String[] args) { new Test2(); } } Sy