protected
protected是什么意思,protected怎么读 语音:
英音 [prə'tektɪd]
美音 [prə'tektɪd]
- 基本解释
- protected是什么意思?
在编程中,'protected'是一个访问修饰符,它主要用于类和方法中。它表示该成员只能被其本身、同一包中的类以及其子类访问。换句话说,一个被声明为protected的成员,其访问权限比public稍弱,但比private强。这样可以允许在同一个包中的其他类访问该成员,同时也可以允许子类访问以进行扩展。这种访问控制方式在面向对象编程中非常常见,用于实现继承和封装。
- 速记技巧
- 中文词源
- 双语例句
用作形容词(adj.)
- It's against the law to kill protected animal.
屠杀被保护动物是违法的。 - As the protected infant industries grow, their costs sometimes fail to decline.
当受保护的新兴工业增长时,有时成本无法降低。
- 常用短语
"protected by": "受...保护",
"protected area": "保护区",
"protected class": "受保护类",
"protected keyword": "受保护关键字",
"protected member": "受保护成员",
"protected scope": "受保护作用域",
"protected state": "受保护状态",
"protected variable": "受保护变量",
"protected value": "受保护值",
"protected view": "受保护视图"
}
以上是留学之路(www.lxroad.com)小编为您整理的protected单词相关内容。