Why i can override protected field in scala?

后端 未结 0 1796
说谎
说谎 2021-01-17 03:26

Code:

class Animal {
    protected val greeting: String = "Some noise"
}
    
class Cat extends Animal {
          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题