首页
话题
动态
专家
文章
作者
公告
更多
积分规则
登录 或 注册
首页
话题
动态
专家
文章
作者
公告
积分规则
发表新帖
发表新帖
Can we override a constructor in Java and can a constructor be private?
后端
未结
关注
11
1850
旧时难觅i
2020-12-29 14:21
I would appreciate an explanation for these questions:
Can we
Override
a constructor in Java?
Can a
Constructor
be private?<
11条回答
攒了一身酷
(楼主)
2020-12-29 15:00
No we can't use a constructor out of class because sub class is treat constructor as a method.. without return type.
You can use it as a private but if a constructor of a class is private then you cannot make the obj of the respected class into another class.
0
讨论(0)
查看其它11个回答
发布评论:
提交评论
加载中...
验证码
看不清?
提交回复
热议问题