Why constructors Cannot be overridden in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at the International Seabed Authority, Lives in Kingston, Jamaica.
Constructor Overriding is never possible in Java. This is because, Constructor looks like a method but name should be as class name and no return value. Overriding means what we have declared in Super class, that exactly we have to declare in Sub class it is called Overriding.
2023-05-14 12:30:36
评论(499)
Helpful(122)
Helpful
Helpful(2)

Ava Martinez
QuesHub.com delivers expert answers and knowledge to you.
Constructor Overriding is never possible in Java. This is because, Constructor looks like a method but name should be as class name and no return value. Overriding means what we have declared in Super class, that exactly we have to declare in Sub class it is called Overriding.