MCQ Single Best Answer Easy

QThere are four categories of class members:

ID: #5003 Javascript Classes MCQ 177 views
Question Info
#5003Q ID
EasyDifficulty
Javascript Classes MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Instance methods, Instance fields, Static method, Dynamic method
  • B Instance fields, Instance methods, Class fields, Class methods
  • C Instance fields, Non-instance fields, Dynamic methods, Global methods
  • D Global methods, Local methods, Dynamic methods, Static methods
Correct Answer: Option B

Explanation

A class in object-oriented programming typically contains data members (also called instance variables) and associated member functions (also called instance methods). These data members and member functions make up the class's instance fields and instance methods, respectively.

In addition to instance fields and instance methods, a class can also have class fields and class methods, which are shared by all instances of the class. Overall, a class can have four kinds of members: instance fields, instance methods, class fields, and class methods.

Share This Question

Challenge a friend or share with your study group.