import java.util.SplittableRandom; /** * Created by xabcd on 2019/2/15. */ public class java_jicheng...
java类的继承1
/** * Created by xabcd on 2019/2/15. */ public class jicheng { String name; int age; } class Student...
java类的封装范例2
本范例解决类的私有属性和外部设置属性的矛盾问题: /** * Created by xabcd on 2019/2/15. */ public class Person { private Strin...
java 类的封装范例1
/** * Created by xabcd on 2019/2/15. */ public class Person { String name; int age; void talk() { Sy...
java练习
/** * Created by xabcd on 2019/2/14. */ public class pracclass { String name="张三"; int age=20; Strin...
java 在类的内部调用方法
/** * Created by xabcd on 2019/2/14. */ public class Person5 { private String name; private int age;...
java构造方法的私有——产生本类中的实例化对象(精华)
/** * Created by xabcd on 2019/2/14. */ public class testprivate2 { String name; //本类中声明一个Person对象p,...
java 构造方法的私有——范例
/** * Created by xabcd on 2019/2/14. */ public class testprivate { private testprivate(){ System.out...
java构造方法(有参和无参注意事项):
/** * Created by xabcd on 2019/2/14. */ public class Person4 { private String name; private int age;...
java构造方法的重载
/** * Created by xabcd on 2019/2/14. */ public class Person3 { private String name; private int age;...