Saved Bookmarks
| 1. |
Why do classes use accessor methods?(a) To make public data accessible to client(b) To make public data private to client(c) To make private data public for whole program(d) To make private data accessible to the client |
|
Answer» Correct answer is (d) To make private data accessible to the client Explanation: The private data of a class is usually not accessible. But the data can be accessed by the user using accessor functions. These functions allows the user to get the data stored as private in a class. |
|