Ruby - Inheritance
Which of the following is the correct way to override a method named
greet in a Ruby child class?greet in a Ruby child class?def method_name followed by body and end. Multi-line with indentation is standard. Parentheses are optional, but def greet() puts ... end is valid syntax if properly formatted. Colon syntax is invalid.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions