I don`t find any restriction when using a static method without public.
I wonder when should I use public static instead of just static
Thanks
I don`t find any restriction when using a static method without public.
I wonder when should I use public static instead of just static
Thanks
There isn’t any functional difference, because the default access modifier is public. It’s a best practice, though, to specify an access modifier explicitly to show that you thought about it and decided that public is the right one for the given method, not that you just forget about it.