What is the difference between a class method and a static method?

A class method takes cls as the first parameter while a static method needs no specific parameters . A class method can access or modify the class state while a static method can’t access or modify it. In general, static methods know nothing about the class state.24 Ağu 2021

Sizin İçin Seçtik  What is the relation and difference between class and object?

Leave a Reply

Your email address will not be published. Required fields are marked *