Question 1 of 25
Hints left: 3
Q1
Which method is called when an object is garbage collected in Ruby?
Q2
What is the purpose of the attr_writer method in Ruby classes?
Q3
What is encapsulation in object-oriented programming (OOP)?
Q4
What is polymorphism in Ruby?
Q5
In Ruby, what is the purpose of method overloading?
Q6
In Ruby, what is the purpose of the attr_reader method in a class?
Q7
What does the super keyword do in a Ruby class method?
Q8
What does the `protected` keyword do in Ruby classes?
Q9
What is the purpose of method overriding in Ruby?
Q10
Which keyword is used to define a private method in a Ruby class?
Q11
In Ruby, which method is used to define getter and setter methods for class attributes?
Q12
Which keyword is used to define an instance method in Ruby?
Q13
In Ruby, what is a superclass?
Q14
What is the purpose of inheritance in Ruby?
Q15
What is the purpose of encapsulation in Ruby classes?
Q16
Which keyword is used to access methods and variables within the same class in Ruby?
Q17
What is the purpose of the `include` keyword in Ruby classes?
Q18
What is the purpose of the initialize method in Ruby classes?
Q19
What does the protected keyword do in Ruby classes?
Q20
In Ruby, what is the purpose of the `super` keyword when used in a method?
Q21
What is the difference between a class method and an instance method in Ruby?
Q22
Which keyword is used to define a class method in Ruby?
Q23
What is the purpose of the private keyword in Ruby classes?
Q24
What is the purpose of the `extend` keyword in Ruby classes?
Q25
What is the purpose of the extend keyword in Ruby?