---
id: 69ae9f3ca9e6da4eb0d5f7f9
title: Getters and Setters
challengeType: 11
videoId: o8zKHbpd87s
dashedName: getters-and-setters
---

# --description--

In this video, you will learn about getters and setters.

# --questions--

## --text--

What is a setter?

## --answers--

A function that automatically deletes an object when it goes out of scope.

---

A method that retrieves or reads the value of an attribute.

---

A method in a class used to set or update the value of a private or protected attribute.

---

A method that creates a new class instance without modifying any attributes.

## --video-solution--

3


