MCQ Practice Single Best Answer Topic: Javascript Classes MCQ

Q There are four categories of class members:

Question ID
#5003
Subchapter
Javascript Classes MCQ
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is 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: 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

Share this MCQ with your friends or study group.