fork download
  1. class Cs
  2. @@count = 0
  3. def initialize()
  4. @@count = @@count + 1
  5. end
  6. def Cs.getCount()
  7. return @@count
  8. end
  9. end
  10. i1 = Cs.new()
  11. i2 = Cs.new()
  12. i3 = Cs.new()
  13. i4 = Cs.new()
  14. p Cs.getCount()
  15.  
Success #stdin #stdout 0.01s 7408KB
stdin
Standard input is empty
stdout
4