题目
IPRO002 Week 3 Concept Check
单项选择题
What does the instanceof keyword do?
选项
A.It converts an object to a primitive data type.
B.It checks if an object belongs to a specific class
C.It is used to create a new instance of a class.
D.It is used to declare a new instance variable.
查看解析
标准答案
Please login to view
思路分析
Question: What does the instanceof keyword do?
Option 1: 'It converts an object to a primitive data type.' This is incorrect. The instanceof operator does not perform type conversion; it only tests the runtime type of an object against a given class ......Login to view full explanation登录即可查看完整答案
我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。
类似问题
What does the instanceof keyword do?
What type of validation check is shown above?
How would you find the data type of a variable x in Python?
What will the function `(define (test x) (cond ((number? x) "num") ((string? x) "str") ((list? x) "list") (else "other")))` return when `(test "hello")` is called?
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!