Examveda

Which of the following is a correct way to define a method that takes multiple arguments in Ruby?

A. def method(arg1, arg2)

B. def method(arg1, arg2); end

C. def method(arg1 arg2); end

D. def method(arg1 arg2)

Answer: Option A


This Question Belongs to Ruby Programming >> Methods In Ruby

Join The Discussion

Related Questions on Methods in Ruby