java 静态变量赋值

public class StaticTest {
	public static void main(String[] args) {
		System.out.println(StaticTest.country);
		System.out.println(StaticTest.province);
	}

	static {
		country = "美国";
	}
	private static String country = "中国";

	private static String province = "山东";
	static {
		province = "北京";
	}
}
相关文章
相关标签/搜索