This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Are loaded into memory when the particular class is loaded.
Stay put in memory (hence the word static), although a GC can rearrange all the memory.
Go with the class, so should be called by MyClass.itsStaticMember
A class has one copy of each static member
Each instance of the class has one copy of each non-static (better called instance) field
Access to static members is controlled just as for instance members: public private [default] or protected
Every instance of a class has access to all its private static members, but remember there is only ever one copy of each, so they all access the same memory location
Public static members can be imported into other classes with import static, then used as if they were static members of both classes
Static members are in existence and accessible before any instances have been created
Because the static members are in memory before the instances are created, the static members cannot find out the memory locations of the instances, so static methods cannot access "non-static" (instance) members.I hope this all helps.