Should I always use a constructor?

If you don’t implement a constructor, the compiler will implictly create a default constructor if the class needs a constructor. So it depends on what you’re really asking. If you’re asking if you can write a class without explicitly creating a user defined constructor, yes you can do that.

Read more

Should all Java classes have a constructor?

Java doesn’t require a constructor when we create a class . However, it’s important to know what happens under the hood when no constructors are explicitly defined. The compiler automatically provides a public no-argument constructor for any class without constructors. This is called the default constructor.2 Eki 2017

Read more