0
点赞
收藏
分享

微信扫一扫

SubInstantProcess


package com.shrimpking.t2;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Shrimpking
 * @create 2024/9/16 20:44
 */
class Person4{
    String name;
    int age;

    public Person4(){
        System.out.println("--父类构造 1.public person");
    }
}

class Student4 extends Person4{
    String school;

    public Student4(){
        System.out.println("--子类构造 2.public student");
    }
}

public class SubInstantProcess
{
    public static void main(String[] args)
    {
        Student4 s = new Student4();
    }
}

举报
0 条评论