Difference between functions

what is diffrence between function static void display_packets_created(); and static function void display_packets_created();
methods?

static function is a function whose scope is static. I mean, a static function remains same for ALL the objects of a class. In system memory, the function is stored at a single place and all the objects access that function memory.

‘function static‘ is another type of function that makes the scope of its internal variables as static. This type of function DO NOT initialize its variables during each call…!!
The scope of internal variables of function becomes static. Rest of the class variables scope remains the same (auto).

In reply to venkatesh konduru:

You should never need to write
function static
, and it is illegal if defining a class method. See “static task” vs. “task static” | Verification Academy