Both class and module are a collection of methods and properties. The major
difference is that instances can be created from a class in the form of
objects, but not from a module. The scope of the members of a class is
only for the lifetime of the object, but the scope of the members of a
module exist for the life of the program.
Asked In: Many Interviews |