Rajeev Motha wrote:You may use the constructor to set values at point of instantiation. However, an object may have many attributes that 1) you may not know at the point of instantiating or 2) may need to be changed after instantiating.
For this you need setters.