0
What is the advantage of static function and where it will useful???
the static key word infront of function is a called static function but what is it's purpose
1 Odpowiedź
+ 3
For example to create functionality which doesn't need a state. For example a min(a, b) function which returns maximum of a or b should be static to be able to call without creating an instance of a class. Utility methods are usually static.