package com.mooctest.demo;

public class Test {

    public static void main(String[] args) {

        Parent son = new Son();
        son.say();
    }


}
class Parent {
    public void say() {
        hello();
    }
    protected void hello() {
        System.out.println("parent say hello...");
    }
}

class Son extends Parent {
    @Override
    protected void hello() {
        System.out.println("son say hello...");
    }
}