static local variable?

Hi,Why a local variable can not be declared as static? What is the logic behind this static keyword?thks.
[126 byte] By [padikkathavana] at [2007-11-27 6:47:52]
# 1

static members belong to the class, not to the instance(s),

the class with its (static) members lives in perm space (special kind of heap),

instances live on the regular heap

method local variables belong to the executing thread,

thread local variables are allocated on the stack,

thread local variables go out of scope when the method completes

tschodta at 2007-7-12 18:20:57 > top of Java-index,Java Essentials,New To Java...
# 2

> Hi,

>

> Why a local variable can not be declared as static?

> What is the logic behind this static keyword?

>

> thks.

In C, a static local variable is used to maintain state between function calls. In Java, the way to maintain state is with a member variable. We have no need of static local variables.

The meaning of the static keyword is "associated with the class as a whole, rather than with any one instance."

jverda at 2007-7-12 18:20:57 > top of Java-index,Java Essentials,New To Java...