--%>

Explain Static variable

Static variable: It is a static variable defined within a class body. Such a variable fits in to the class as a whole, and is, thus, shared by all objects of the class. The class variable may be employed to define the default value of an instance variable, for illustration, and would probably as well be stated as final, too. They are too employed to contain dynamic information which is shared among all instances of a class. For instance the later account number to be assigned in a bank account class. The care should be taken to make sure that access to share the information, like this is synchronized where multiple threads could be included. Class variables are too employed to provide names to application-wide values or objects as they might be accessed directly through their containing class name instead of an instance of the class.

   Related Questions in Programming Languages

  • Q : What is Virtual desktop Virtual desktop

    Virtual desktop: The name employed to explain a user's graphical working area in a window manager. The name arises in the early days of graphical user interfaces whenever it was thought that such would lead to `paperless offices'. This was anticipated

  • Q : Explain Polling Polling : It is the

    Polling: It is the process of repeatedly testing until a situation becomes true. Polling can be incompetent when the time between tests is little compared with the time it will take for the condition to become true or right. A polling thread must slee

  • Q : Choices in the Choice Activity Normal 0

    Normal 0 false false

  • Q : Basic programming help In C Language 1.

    1. In what ways are the initialization, repetition test, and update steps alike for a sentinel-controlled loop and an endfile-controlled loop? How are they different? 2. Rewrite the program segment that follows using a for loop: count = 0;

  • Q : Explain the term QTP Environment

    Explain the term QTP Environment?

  • Q : What is the way to render XForms What

    What is the way to render XForms?

  • Q : Define the term Assignment statement

    Define the term Assignment statement: It is a statement employing the assignment operator.

  • Q : Define Number of Interleavings Number

    Number of Interleavings: Besides the raw number of threads, the state space is affected by the number of potential interleavings of these threads. While there exist automated techniques (partial-order reduction) to reduce these interleavings, most mod

  • Q : What are the tools require writing

    What are the tools require writing XHTML documents?

  • Q : Explain Downcast with example Explain

    Explain Downcast with example: It is a cast towards an object's dynamic kind - that is, `down' the inheritance hierarchy. For illustration:        // Downcast from Object to String