java类的继承1

2019年2月15日22:40:32 发表评论 3,341 views

发现个好东西: 一个免费短链生成项目:“ https://www.isok.co”一个可以生成所有短链的服务,isok.co的这个含义能覆盖所有短链含义isok, 我试过了很不错,都可以试试

/**
 * Created by xabcd on 2019/2/15.
 */
public class jicheng {
    String name;
    int age;
}
class Student2 extends jicheng{
    String school;
}



import java.util.SplittableRandom;

/**
 * Created by xabcd on 2019/2/15.
 */
public class java_jicheng
{

    public static void main(String[] srgs)
    {
        Student2 s = new Student2();
        s.name = "张三";
        s.age = 25;
        s.school = "北京";
        System.out.println("姓名"+s.name+",年龄:"+s.age+",学校:"+s.school);
    }
}



结果:
姓名张三,年龄:25,学校:北京



发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: