Ruby - Class Methods and Variables
Which of the following is the correct syntax to define and use a class variable in Ruby?
@@, so @@count = 0 is correct for defining a class variable.@count is an instance variable, $count is a global variable, and count alone is a local variable.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions