for InterView one question per day

本文主要探讨了接口和抽象类之间的区别,包括它们所展示的不同关系类型:接口体现的是像一个的关系,而抽象类则体现了是一个的关系。此外,文章还解释了public、private、protected和default修饰符的访问权限范围以及==和equals方法的区别。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1:What's the difference between Interface and Abstract Class?
Answer:
i.similarity:
a)can not be instance
ii.Difference:
a) InterFace want to show the "like a " relation
b) Abstarct Class want to show the "is a" relation

2.Public/Private/Protected/Default?
Answer:
the difference is about the "access authority "

pubilc:the largest access authority
private:can be access or visible by itself
protected:can be access or visible by the subclasses or the other classes in same package
default:can be ... in same package

3.the distinction of "==" and "equals"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值