If a class is not required to initialize its data member or does not contain data member, there is no need to write empty constructor explicitly . On class object creation, default constructor implicitly called will be enough.10 Eki 2016
Read moreWhat will happen if there are no constructor in C++?
If your class has no constructors, C++ will automatically generate a public default constructor for you . This is sometimes called an implicit constructor (or implicitly generated constructor).
Read moreDoes every Java class have a constructor?
Every class has a constructor whether it’s a normal class or a abstract class . Constructors are not methods and they don’t have any return type. Constructor name should match with class name . Constructor can use any access specifier, they can be declared as private also.
Read moreCan we have a class with no constructor in it in Java?
It is possible for a class to have no constructor . (An important distinction to draw here is that the JVM does not require all class files to have a constructor; however, any class defined in Java does have a default constructor if a constructor is not explicitly declared.
Read more