0
Instance Method and Class Method differences?
So a Class Method can be call only if we put the "class_name" + "." + "method_name" And the Instance Method can be call by class_name and object_name too?
2 Antworten
+ 1
Static methods and variables belong to the class and not objects of that class, when you think about it if a static variable only belongs to the class and there is only one class then that means there is only ever one copy of that static variable which makes it a class variable or method and not a instance method or variable, this means you can just access them without having to create an instance of class.