Question: are getters and setters constructors?
Answer: A constructor is a method which is called when an object of the class is instantiated. It is used to set default values to the attributes of the class. The name of the constructor is the same as the class name. ... Getters and setters are methods that are used to access the attributes of an object.