Why aren't classes sealed by default?

前端 未结 9 1750
天命终不由人
天命终不由人 2020-12-05 22:59

I was just wondering, since the sealed keyword\'s existence indicates that it\'s the class author\'s decision as to whether other classes are allowed to inh

9条回答
  •  Happy的楠姐
    2020-12-05 23:57

    You could probably make just as many arguments in favor of sealed-by-default as you could against it. If it were the other way around, someone would be posting the opposite question.

提交回复
热议问题