+ 2
Please provide some examples of static methods and class methods
2 Respostas
+ 1
it's such math.square(x) static method of class math
+ 1
A static method is used when you want to give users the ability to use your method in the instance, but it doesn't uses any information about the instance.
I can't really give you examples of class methods, however, because I am not at this level of programming yet.