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 : Explain Branch instruction Branch

    Branch instruction: It stores a new instruction address into the program counter. The consequence of this is the next instruction to be fetched will not generally be the one instantly following the branch instruction. Therefore the normal chronologica

  • Q : Explain Operating system Operating

    Operating system: The operating system permits a computer's hardware devices to be accessed by the programs. For example, it permits data to be managed on a computer's disks in the form of a file system and it delivers the co-ordinate positions of a m

  • Q : What is Bounded repetition Bounded

    Bounded repetition: The Repetition where statements within a loop's body are executed a fixed number of times and the number of times is established whenever the loop began. There is no control structure in Java which guarantees the bounded repetition

  • Q : What are Relational operators

    Relational operators: Operators, like <, >, <=, >=, == and!=, which produce a Boolean outcome, as portion of a Boolean expression.

  • Q : How class can be prevented from

    How class can be prevented from inheriting further?

  • Q : What is Static method Static method :

    Static method: The static method (also termed as a class method) is one with static reserved word in its header. The static methods vary from all other methods in that they are not related with any specific instance of the class to which they fit in.

  • Q : What is Common Gateway Interface Common

    Common Gateway Interface: The Common Gateway Interface (abbreviated as CGI) is a standard which permits Web clients to interact with programs on Web server. The CGI script is on the server and is able to process arguments or input from a client, and r

  • Q : Differentiate between RDO and ADO

    Differentiate between RDO and ADO?

  • Q : Explain the term an XHTML element

    Explain the term an XHTML element attribute.

  • Q : Functions of Interrupts and system calls

    What are the various functions of Interrupts and system calls?

©TutorsGlobe All rights reserved 2022-2023.