csharper said:
It doesn't matter Java or .NET OOP is OOP (Object Oriented Programming).
If the method was public static, then another class can access the
public static method without having to instantiate an class as an
instance of an object first, before accessing the public method in the
class/object.
http://leepoint.net/notes-java/flow/methods/50static-methods.html
Why declare a method static?
The above mean() method would work just as well if it wasn't declared
static, as long as it was called from within the same class. If called
from outside the class and it wasn't declared static, it would have to
be qualified (uselessly) with an object. Even when used within the
class, there are good reasons to define a method as static when it could
be.
•Documentation. Anyone seeing that a method is static will know how to
call it (see below). Similarly, any programmer looking at the code will
know that a static method can't interact with instance variables, which
makes reading and debugging easier.
•Efficiency. A compiler will usually produce slightly more efficient
code because no implicit object parameter has to be passed to the method.
http://www.eggheadcafe.com/articles/20020206.asp
You access static methods and fields associated with a class differently
that you access them as objects (instances of a class). Instead of
specifying the name of the instance to access the method
(cp1.GetMaxCashAdvance) you will specify the name of the class:
CreditCardAccountPremium.GetMaxCashAdvance(). The static modifier can be
used with fields, methods, properties, operators, and constructors, but
cannot be used with indexers, destructors, or types. C# trashes the
whole concept of global functions, variables, and constants. Instead,
you can create static class members, making your C# code not only easier
to read, but less likely to cause naming and other conflicts.