/** * Created by xabcd on 2019/2/17. */ public class java_static2 { { System.out.println("1.public p...
java——static静态方法
/** * Created by xabcd on 2019/2/17. */ class java_static { String name; private static String city ...
java——静态变量static的优点
/** * Created by xabcd on 2019/2/17. */ class java_static { String name; static String city = "中国"; ...
java——用this调用构造方法:
/** * Created by xabcd on 2019/2/16. */ class thistook { String name; int age; public thistook() { S...
java——判断两个对象是否相等
/** * Created by xabcd on 2019/2/16. */ class java_or { String name; int age; public java_or(String ...
?java——this用法:(无法从静态上下文引用this
this表示当前对象,所谓当前对象,就是调用类中属性或方法的那个对象。 /** * Created by xabcd on 2019/2/16. */ public class total_this ...
java接口对象的实例化2
import com.sun.management.UnixOperatingSystemMXBean; /** * Created by xabcd on 2019/2/16. */ interfa...
java接口对象的实例化
接口中没有构造方法,但是可以通过对象的多态性概念,通过接口的子类对其实例化。 /** * Created by xabcd on 2019/2/16. */ interface ja_jiekou {...
java——覆写equals
/** * Created by xabcd on 2019/2/16. */ public class person_equals { private String name; private in...
?java——equals
/** * Created by xabcd on 2019/2/16. */ public class person_equals { private String name; private in...