
好词典

源自中古英语 enheriten,来自古法语 enheriter,最终源于拉丁语 inhereditare(使继承),由 in-(进入)+ hereditas(继承)构成。
❶ 通过法律或血缘关系从已故亲属那里获得财产、头衔或特征。常用于描述财产继承或基因遗传。
“She inherits her grandmother's antique jewelry.”
(她继承了祖母的古董珠宝。)
“The eldest son inherits the family estate.”
(长子继承家族庄园。)
❶ 在编程中,指子类自动获得父类的属性和方法。这是面向对象编程的核心概念之一。
“The child class inherits all methods from its parent.”
(子类继承了父类的所有方法。)
“This object inherits properties from the base class.”
(该对象继承了基类的属性。)
inherits from — 在编程中表示一个类从另一个类继承特性,或描述某人从特定家族继承某物。
“The Dog class inherits from the Animal class.”
(Dog类继承自Animal类。)