Intermediate
Ruby
Q53 / 100
What is the effect of "private" keyword in a class definition?
Correct! Well done.
Incorrect.
The correct answer is A) It makes all subsequent methods accessible only without an explicit receiver (cannot be called as obj.method from outside)
A
Correct Answer
It makes all subsequent methods accessible only without an explicit receiver (cannot be called as obj.method from outside)
Explanation
Methods declared after "private" cannot be called with an explicit receiver from outside the object (with rare exceptions for setters), restricting them to internal use.
Progress
53/100