- 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
- Share this MCQ
Answer:
B
Share this MCQ
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 MCQ