121k views
2 votes
Which methods are called to determine the value of a variable?

1) accessor methods
2) methods
3) modifier methods
4) constructor methods

1 Answer

4 votes

Final answer:

In computer science, accessor and modifier methods are used to determine the value of a variable.

Step-by-step explanation:

In computer science, the methods used to determine the value of a variable are called accessor methods and modifier methods. These methods are part of object-oriented programming and allow us to get or set the value of a variable from outside the class where the variable is defined.

An accessor method returns the value of a variable, while a modifier method changes the value of a variable. Constructor methods are used to initialize an object and are not directly related to determining the value of a variable.

User Alexey Podlasov
by
7.8k points