--%>

Explain Global variable

Global variable: It is a phenomenon which is more generally regarded as being a trouble in structured programming languages than in object-oriented languages. In structured programming language, like C or Pascal, a global variable is one stated outside the procedures and functions of a program. This is hard to keep track of the usage of this variable as it is readable and writable by the entire program or module in which it is stated. This makes these variables a general source of logical errors. However, instance variables pose a similar trouble within class definitions, as Java's scope rules make them available to all methods stated within a class. This is one of the reasons why we favor to channel access to instance variables via accessor and mutator techniques even in a class.

   Related Questions in Programming Languages

  • Q : What is an Arithmetic expression

    Arithmetic expression: It is an expression comprising numerical values of integer or floating point kinds. For example, operators like +, -, *, / and % get arithmetic expressions as their operands and generate arithmetic values as their outcomes.

  • Q : Define the term Field Define the term

    Define the term Field: Variables stated within a class or interface, exterior of the methods. The fields are members of a class.

  • Q : What is an Initializer Initializer : A

    Initializer: A block stated at the outermost level of a class - identical to a method devoid of a header. The initializer blocks are executed, in order, whenever an instance is formed. They are executed prior to the constructor of the defining class,

  • Q : What is the way to use XForms What is

    What is the way to use XForms?

  • Q : Explain the way to back-up active

    Explain the way to back-up active directory.

  • Q : Differentiate overriding and

    Differentiate overriding and overloading method?

  • Q : ArrayLists I. The Assignment The

    I. The Assignment The Bashemin Parking Garage contains a single lane that can hold up to ten cars.  Arriving cars enter the garage at the rear and are parked in the empty space nearest to the front.  Departing cars exit only from the front.  If a cu

  • Q : Define the term Image map Define the

    Define the term Image map: This is an image, divided into logical regions, each of which has a hot spot.

  • Q : Programming assignment Written (7

    Written (7 points): pp. 303-304: 1, 5, 6, 7 pp. 363-364: 3, 4, 6. pp.303-304: 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? 5. Rewrite the program

  • Q : Examples of applications which can

    Give some examples of applications which can benefit from using XML?