L
L
Leo Messi2015-07-10 18:47:58
Java
Leo Messi, 2015-07-10 18:47:58

Why specify an empty constructor?

I read Schildt and there was such question. As I understand it, this is one of the ways to implement polymorphism and inheritance in JAVA, but still an empty constructor - it does not carry any information, why then specify it at the beginning of the class?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Gamega, 2015-07-10
@LionelMessi

sometimes it is necessary for code generators and libraries to work, for example, for ormlite to work, you need to describe an empty constructor in the model, but in the general case this is not necessary

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question