static methods can have variables which are

declared outside the method but are final
declared outside the method but are static
declare inside the method

static method has only one copy running for any no of
objects, so just imagine if you have a variable which
is declared outside the method and if this variable is
used inside a static method then there will be issues
as the variable being used belongs to which instance
of object, since there is only one copy of static
method which does not know how many copies of actual
object is running presently

i hope this has cleared your query


--- siva kumar <doitsiva@gmail.com> wrote:

> hi,
>
> hi,
>
> why not we does not use static method have non
> static variable.... any
> spacific resone????
> 