Static identifier

Total Post:113

Points:791
Java  OOPS 
 208  View(s)
Ratings:
Rate this:

What is the Static identifier in oops concepts ?

  1. Post:140

    Points:984
    Re: Static identifier

     static identifier :

    The static identifier is used for only one times initialization and the value access during the life time of the program /application. A separate memory is allocated for static variables. This value can be used between function calls. The default value of an uninitialized static variable is zero. 

    A static identifier of program execution depends on its default value of a uninitialized static identifier which is zero. 

    class StaticEx{ 
    static int initializeValue;
    static{
    initializeValue = 5;
    System.out.println("I");
    }
    {
    initializeValue = 50;
    System.out.println("II");
    }
    StaticEx(){
    initializeValue = 500;
    System.out.println("II");
    }
    }

Answer