Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyRubyinstance vs class variablesSingle-choice MCQ

What do the two puts lines print?

class Vehicle @@count = 0 def initialize @@count += 1 end def self.count @@count end end class Car < Vehicle end Vehicle.new Car.new puts Vehicle.count puts Car.count