It's a good question.
As Described here, it's not a Bad Practice, I think there are consideration for both sides.
Use setter vs use this in constructor.
I don't know why this section doesn't described and discussed better in the docs and college courses of OOP, because I found that there is a very big weight on "Getters & Setters", but the constructor in the studying Materials mostly defined by this keyword, and there is a lot of using in protected fields for subclasses.
Is using setters method inside a constructor to initialize a variable
a bad practice in Java?
Assuming that by ‘variable’ you mean a field on the instance or class,
and that by ‘setter’ you mean a public method which other objects can
use to set the value:
No, it’s not bad practice.
If there are business rules that dictate the value of the field must
be limited to certain values or validated, then that validation code
belongs in the setter. In fact, I would say it’s bad practice for the
constructor to bypass the validation code.
However, there are two things you should keep in mind:
As Peter Koves points out, methods called from the constructor must
not assume that the object is fully constructed when they are called.
But in the case of setters, this isn’t usually a problem, because
setters are usually only concerned with setting one field. If a method
called by the constructor is overridable, this could result in its
work - important to the construction of the object - not being done in
a subclass which overrides it. Therefore, it’s good practice to make
methods called by the constructor private or final (when the class
itself isn’t final). Summary: setters that contain logic that the
constructor depends on should be final; any other method that the
constructor depends on should be private.