J
jdm
i'm trying to create what C calls a static local variable inside a particular
method, i.e. this variable should not be visible outside the method and its
value should survive the activation of the method.
instance variables are "static" but visible to all methods of the instance.
local variables are visible only to a particular method but aren't "static".
i've been through the pickaxe book and nothing obvious popped out at me. it
seems i could synthesize the desired functionality using singleton methods
attached to a particular instance (or maybe by defining a block within the
method) but i'm hoping there's a simpler, cleaner way.
thanx in advance.
method, i.e. this variable should not be visible outside the method and its
value should survive the activation of the method.
instance variables are "static" but visible to all methods of the instance.
local variables are visible only to a particular method but aren't "static".
i've been through the pickaxe book and nothing obvious popped out at me. it
seems i could synthesize the desired functionality using singleton methods
attached to a particular instance (or maybe by defining a block within the
method) but i'm hoping there's a simpler, cleaner way.
thanx in advance.