Machine-translated by Google. Questions are authored in English.
Top

Discussion

A/An ______ is a user-defined datatype which has data members and member functions.

  • A.class
  • B.object
  • C.package
  • D.method

Answer: A

A class is a user-defined data type that holds data members and member functions. An object is an instance of a class, created from it, not the type itself. A package is a way of grouping related classes in languages such as Java, and a method is a single function inside a class. Only the class fits the definition. In Java and C++ the keyword class is used to define such a type, and objects are then created from it.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.