S
Stefan Ram
Martin Gregorie said:The problem is that declaring a variable as 'static' doesn't
really indicate that its common to all instances of the
declaring class as well as containing a persistent value.
It indicates what is being specified about it in the Java
Language Specification, Third Edition. I do not see a problem.
The same argument applies to C, where 'persistent' would be a
better modifier than 'static', because thats really what
'static' means in that language.
It also has other meanings in C, as in
static void f(){}
. »Persistent storage« often is used to describe storage
persisting a program invocation (persisting a process).
In Java 'static' could usefully be replaced by 'singular' or 'common' to
indicate that the variable is accessible from several class instances.
A static field of a class is accessible even without
any class instance.
»static« does not need to refer to a variable at all,
it also might refer to an inner class.