我是靠谱客的博主 丰富小丸子,这篇文章主要介绍java类中有哪些成员,java – 哪些成员不在子类中继承?,现在分享给大家,希望可以做个参考。

我想回答以下问题:

A child class would not inherit certain members of the parent class. Name three

such members.

我知道私有成员不会继承到子类,并且默认成员不会在包外继承.任何人都可以完成答案吗?

编辑: –

我相信静态成员是根据下面的演示继承的

public class sup {

public static void main(String agr[]){

}

protected static int staticInt=0;

protected final int finalInt=3;

protected int protectedInt=0;

public String publicString = "";

private int privateInt=8;

}

class sub extends sup{

public void del(){

staticInt=1;

staticInt=finalInt;

}

}

最后

以上就是丰富小丸子最近收集整理的关于java类中有哪些成员,java – 哪些成员不在子类中继承?的全部内容,更多相关java类中有哪些成员,java内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(51)

评论列表共有 0 条评论

立即
投稿
返回
顶部