Vidyalelo
Ruby Programming · Q34

Object Oriented Programming (OOP) Concepts in Ruby

Programming · Ruby Programming · question 34

Q34

What does the `protected` keyword do in Ruby classes?

A.
Makes methods accessible only within the class and its subclasses
Answer
B.
Makes methods accessible only within the class
C.
Makes methods accessible only from outside the class
D.
Makes methods accessible from anywhere in the code

Answer: Option A

Solution

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