多选题 What is the best data type to use when storing a status code that may have one of the following values: success, failed, success with errors, or undetermined?
  • A. Object
  • B. Class
  • C. boolean
  • D. enum
  • E. int
【正确答案】 D
【答案解析】enum或者enumeration用于存储可能成为一些预定义的数据类型之一的数据。A、B、C和E不正确。A不正确,因为对象用于存储复杂的数据结构。B不正确,因为类用于创建对象。C和E不正确,因为两者都是基本数据类型,并且不适合这个特定的应用程序。