Q. What is the purpose of getters and setters?
Solution:
Getters and setters control access to private attributes, enhancing encapsulation.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
Getters and setters control access to private attributes, enhancing encapsulation.
Strengthen Your Practice with our comprehensive question bank.