What is the difference between a class method and an instance method in Ruby?
A. Class methods are called on the class itself, while instance methods are called on instances of the class
B. Instance methods are called on the class itself, while class methods are called on instances of the class
C. Class methods are public, while instance methods are private
D. Instance methods are public, while class methods are private
Answer: Option A
Related Questions on Object Oriented Programming (OOP) Concepts in Ruby
A. A blueprint for objects
B. A variable holding multiple values
C. A single data structure
D. A method to define behavior
What does the initialize method do in a Ruby class?
A. Initializes class variables
B. Defines instance methods
C. Defines class methods
D. Initializes new objects

Join The Discussion