Using Hooks - types of function declaration

Hi,
in the hookfile template created by the Modulebuilder, there are several example functions. Some are “public function…” and others are just “function…”.
I have done a couple of override functions and they work whether declared as public or not.

So, when should I use which type of function declaration?