题目
题目
单项选择题

Question at position 17 What is the main purpose of encapsulation?To easily increase the number of available methods in the classTo create multiple child classesTo bundle data and methods together and protect internal dataTo override methods and create new behaviorClear my selection

选项
A.To easily increase the number of available methods in the class
B.To create multiple child classes
C.To bundle data and methods together and protect internal data
D.To override methods and create new behavior
查看解析

查看解析

标准答案
Please login to view
思路分析
The question asks about the main purpose of encapsulation in object-oriented programming. Option 1: 'To easily increase the number of available methods in the class' — Encapsulation does not primarily aim to increase methods; it focuses on data protection and hiding implementation details, though it ma......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!