- static is used to define a member that is independent of any abject.
- i.e., static variables create a common memory for all the objects.
- static variables will be created only once while class is loading into memory, there after sharable among all other objects.
- If static variable is public, then it can be accessed by using
- Syntax:
<className>.<variable>;
static variable
Subscribe to:
Post Comments
(
Atom
)
0 comments :
Post a Comment