You don't get anythin unless you create an object of the that class with new, and at so point data storage is created and me Thods become available.
But there was and situations in which this approach was not sufficient. One is if you want to has only one picec of storage for a particular piece of data,regardless of what many objects is CRE Ated,or even if no objects is created. The other are if you need a method, that isn ' t associated with any particular object of this class. The above is the "thinking in Java" for What to use the description of the static keyword, translated even based on the following two reasons: 1. You only need to save one copy of the data in memory; 2. You need some data that is not associated with the object.
Of course,since static methods don ' t need any objects to be created before they is used, they cannot directly access non- Static members, or methods by simply calling those, other members, without referring to a named object (since Non-static Membe RS and methods must is tied to a particular object). The sentence translates to a property or method in which the static method cannot be directly non-static.
Basic Java Essentials Summary of several key keywords (about static, this, final,)