java静态变量、静态方法和静态代码段
摘要:
先上实例public class TestStatic { public static String staticString = "this is a static String"; //静态变量 public String instanceString = "this is a instance String";//实例变量 //静态方法 public static void staticMethod(){ System.out.println("this is a static method"); } //实例方法 public 阅读全文
posted @ 2014-01-14 21:37 luckygxf 阅读(11271) 评论(0) 推荐(2) 编辑