extends的简单介绍
java里extends代表什么
extends 代表继承
Class B extends A{}代表B继承自A,A所拥有的公共方法以前公共变量在B 中可以直接使用,就如同是B自己的一样。
class中 extends与implements的区别
extends与implements的不同

1、在类的声明中,通过关键字extends来创建一个类的子类。
一个类通过关键字implements声明自己使用一个或者多个接口。
extends 是继承某个类, 继承之后可以使用父类的方法, 也可以重写父类的方法;
implements 是实现多个接口, 接口的方法一般为空的, 必须重写才能使用
2、extends是继承父类,只要那个类不是声明为final或者那个类定义为abstract的就能继承
JAVA中不支持多重继承,但是可以用接口 来实现,这样就要用到implements,继承只能继承一个类,但implements可以实现多个接口,用逗号分开就行了 比如 :
class A extends B implements C,D,E
接口实现的注意点:
a.实现一个接口就是要实现该接口的所有的方法(抽象类除外)。
b.接口中的方法都是抽象的。
c.多个无关的类可以实现同一个接口,一个类可以实现多个无关的接口。
与Extends的不同
extends, 可以实现父类,也可以调用父类初始化 this.parent()。而且会覆盖父类定义的变量或者函数。这样的好处是:架构师定义好接口,让工程师实现就可以了。整个项目开发效率和开发成本大大降低。 implements,实现父类,子类不可以覆盖父类的方法或者变量。即使子类定义与父类相同的变量或者函数,也会被父类取代掉。 这两种实现的具体使用,是要看项目的实际情况,需要实现,不可以修改implements,只定义接口需要具体实现,或者可以被修改扩展性好,用extends。
extend中文是什么意思
extend [ik'stend]
vt.
拉开,拉出,拉长;延长;使延伸;使达到:
例句: The carpenter extended the measuring tape as far as it would go.
木匠把卷尺拉长到不能再拉为止。
延伸,延长(如绳、墙、队列等):
例句: The cord has been extended between two bamboo poles.
在两根竹竿之间拉起了一根绳子。
伸,伸出(手臂或手),伸开,展开:
例句: to extend one's hand in greeting
伸出手表示欢迎
to extend a helping hand to the poor
对穷人伸出援助之手
(尤指向水平方向)伸长(如身体、四肢等),使(弯曲的肢体)伸直,使挺直:
例句: to extend one's body on the bed
平躺在床上
to extend your arms horizontally
将手臂伸平
延长…的时间,使展期,使延伸,拖长:
例句: to extend a visit
延长访问时间
to extend the deadline until the end of the month
把截止日期放宽到月底
向各方向展开,扩展:
例句: A huge tent was extended over the field.
一顶大帐篷在原野上扩展开来。
扩大…的范围(或应用),扩大…的影响(或作用);扩展(词义);扩充,使扩大,使更广泛:
例句: The European powers extended their authority in Asia.
欧洲列强在亚洲扩大他们的管辖权。
提供;给予;赠予;致:
例句: to extend aid to needy scholars
向贫困的学者提供帮助
to extend help to poor people
帮助穷人
【财政学】推迟(原承诺的债务偿还期),延期归还(贷款、抵押借款等),宽限:
例句: to get the credit extended
使那笔信贷展期
把…掺杂(或掺假),(掺杂以)增加…的量,把(廉价的次货)掺入以增加(货物等)的体积:
例句: to extend wine with water
在酒里掺水
to extend ground meat with flour
把面粉掺入肉糜中
促进,推动;发展;增进;to extend the use of the computers 推广计算机的运用
发出(邀请、欢迎等):
例句: to extend an invitation
发出邀请
to extend a warm welcome to someone
向某人表示热烈欢迎
扩写出(速记等)的全文
【簿记】
把(数字)转入另一栏,把…转栏
写出…的金额;算出…的总额
【法律】
[英国英语]对(地产、财产等)估价
(根据扣押令)征用,扣押,没收,占有(土地)
【骑马术】使(马)迅跑(或全速奔驰),全力驱策(马等)
使(自己)全力以赴,使竭尽全力:
例句: She was fully extended in the swimming race but she still came last.
在游泳比赛中,她竭尽全力,结果还是游了个末名。
(美国海军陆战队员)再服役(可重新申请入伍或延期退伍)
[古语] 夸张,夸大
[废语]强占,夺取
vi.
伸,伸展,展现,伸直;扩展;扩充;连绵:
例句: The plateau extends for many miles.
高原连绵许多英里。
The border extends as far as the river.
边界一直延伸到河边。
延伸,(在范围或应用上)及到,达到(某一点):
例句: His power extends over the whole country.
他的势力扩大到全国。
The regulations do not extend to pupils.
这些规则不涉及小学生们。
(在长度、面积、范围等方面)增加,增大,扩大;变长:
例句: The country's trade extended from China to Europe.
该国的贸易从中国扩大到了欧洲。
伸出,突出:
例句: the big tree that extends out over the **all house
小房子顶上伸出的一棵大树
延长,延期,延续;继续:
例句: The cold wave extended into April.
寒潮一直延续至4月份。
持续存在;存在;实际上有:
例句: the Soviet Union that extended for more than 70 years
延续了70多年的苏联
【军事】疏开;散开
extends是什么意思?
这是java中继承的意思,子类继承父类需要用此修饰符来修饰子类名
extend是什么意思
extend
英 [ɪkˈstend] 美 [ɪkˈstɛnd]
vt. vi.延伸; 扩大; 推广
vt.伸展; 给予; 延长; 发出(邀请、欢迎等)
vi.伸出; 延伸; 增加
延伸;延长;扩充;伸展
过去式: extended 过去分词: extended 现在分词: extending 第三人称单数: extends
派生词:extendability extendable extendibility extendible extensibility extensible
双语例句
1. The new territory would extend over one-fifth of Canada's land mass.\x09
这块新领土将会使加拿大陆地面积扩展1/5以上.
2. This year they have introduced three new products to extend their range.\x09
今年他们发布了3种新产品,以扩大产品范围.
3. It might be possible to extend the technique to other crop plants.\x09
也许可以将这种技术应用于其他农作物.
4. The high-speed train service is planned to extend from Paris to Bordeaux.\x09
高铁拟从巴黎延伸至波尔多.
5. The caves extend for some 18 kilo-metres.\x09
那些洞穴深约18公里.
extends 与 implements 有什么区别
区别是:
extends 指的是延长; 伸展;(空间、时间等)延伸,延续。
implements 指的是工具; 手段; 履行(契约等)执行; 贯彻; 实现.
例句辨析:
extends
1、The service also extends to wrapping and delivering gifts.
服务项目还包括包装和递送礼物。
2、His power extends beyond the seas.
他的势力扩展到海外。
3、His influence extends beyond the TV viewing audience.
他的影响扩展到电视观众之外。
4、Our personal space extends about 12 to 18 inches around us.
我们的个人空间是周围12到18英寸的范围。
implements
1、They ordered quantities of farm implements.
他们订购了大量农具。
2、This paper introduces the designs and implements of the **all supermarket management system.
本文论述了中小型超市管理系统的设计和实现。
3、Primitive man hunted wild animals with crude stone implements.
原始社会的人用粗糙的石器猎取野兽。
4、These new-style farm implements are easy to use ( or handle).
这些新式农具使唤起来很方便。