📜  在 kotlin 代码示例中打开乐趣

📅  最后修改于: 2022-03-11 14:53:34.285000             🧑  作者: Mango

代码示例1
open class MindOrks {
    //use open keyword to allow child class to override it
    open fun courseName(){
        println("Course Name")
    }
}

class AndroidPro : MindOrks(){
    //use the override keyword to override the function
    override fun courseName() {
        println("Android for Professionals")
    }
}