Vidyalelo
Ruby Programming · Q31

Object Oriented Programming (OOP) Concepts in Ruby

Programming · Ruby Programming · question 31

Q31

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
Answer
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

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board