Intermediate
Ruby
Q43 / 100
What is "duck typing" in Ruby?
Correct! Well done.
Incorrect.
The correct answer is B) A design philosophy where an object's suitability is determined by the presence of certain methods, rather than its class
B
Correct Answer
A design philosophy where an object's suitability is determined by the presence of certain methods, rather than its class
Explanation
Duck typing means "if it walks like a duck and quacks like a duck, it's a duck" — Ruby cares whether an object responds to the needed methods, not its actual class.
Progress
43/100