static variable

  • 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>;

0 comments :

Post a Comment

> Related Posts with Thumbnails
 

Copyright © 2012. GS dot net - All Rights Reserved - Design by BTDesigner - Proudly powered by Blogger