+ 1
Is important the constructor in one program of java??
Constructor
2 ответов
+ 4
Just keep in mind if you do not have a constructor the compiler will interpret it as you having an empty constructor. (This is a default constructor). So you don't actually have to create one manually for every class.
+ 3
a constructor makes it possible that an object is created and that class variables can be initialised, so yes it is important