题目
题目

CSE-110-OD25-27 12.1 Lesson and Knowledge Check - Study Hall Video: episodes: 23-24

单项选择题

What is the purpose of including instance methods in a class?

选项
A.To automatically delete objects when they are no longer in use.
B.To enable objects instantiated from the class to perform specific actions or behaviors.
C.To encrypt all data stored within class instances for security.
D.To restrict the class from creating any instances.
查看解析

查看解析

标准答案
Please login to view
思路分析
In exploring why a class would include instance methods, we consider what instance methods are designed to do. Option 1: 'To automatically delete objects when they are no longer in use.' This describes destructor or finalizer behavior, not instance methods; destructors are a separate m......Login to view full explanation

登录即可查看完整答案

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

类似问题

更多留学生实用工具

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