Java, Spring, Microservices, Interview, Coding.
the constructor approach, when you want to create a new instance of the object, with the values already populated(a ready to use object with value populated). This way you need not explicitly sit and call the setter methods for each field in the object to populate them. You set the value using a