method() is an instance method; you need a car object in order to call it.
set car = ##class(Car).%New()
d car.PrintCar()
ClassMethod() you dont' need an object (provided it's not private).
d ##class(Car).PrintAllCars()
If you know Java, ClassMethod is like a static method; method is like an instance method.
- Log in to post comments