多选题 A system has three sensors attached to it. You need a way to represent this system in your program. What would be the best data type to use to model this system and sensors?
  • A. Object
  • B. boolean
  • C. enum
  • D. int
【正确答案】 A
【答案解析】对象数据类型是开发者可以定义来在应用程序代码中表示系统及其状态的一种数据类型。B、C和D都不正确,因为它们是基本数据类型,并且不能被定义来保存复杂的数据类型。