This question is not connected to a concrete problem but is rather a general one. In Java, when creating a class, there are actually two options how to enable access to the instance variables of that class:
By creating a constructor, who will have a list of arguments that will set up the values of the instance variables.
By adding setters (and getters) methods to the class for setting up the instance variables.
So now I am wondering: which option is actually better to do? I have also read that it is not good approach to keep instance variables not set up when creating an object, it is also advisable to set them some value. Is that true? In that case I would see the first option as the better one.