--%>

Define Accessor method

Accessor method: A technique specifically designed to offer access to a private attribute of a class. By convention, we name accessors with a get prefix followed by the name of the attribute being accessed. For example, the accessor for an attribute named speed would be ‘getSpeed’. By creating an attribute private, we save objects of other classes from varying its value other than via a mutator method. The Accessors are employed both to grant safe access to the value of a private attribute and to save attributes from inspection by the objects of other classes. The later goal is attained by selecting a suitable visibility for the accessor.

   Related Questions in Programming Languages

  • Q : Define the term Identifier Define the

    Define the term Identifier: It is a programmer-defined name for a method, variable, class and interface.

  • Q : What is Stack overflow Stack overflow :

    Stack overflow: Stack overflow takes place whenever too many items are pushed onto a stack with a finite or limited capacity.

  • Q : Define Finally clause Finally clause :

    Finally clause: This is a part of try statement which is always executed, either subsequent the handling of caught exception, and normal termination of the protected statements.

  • Q : Explain way to open one resistance of

    Explain the way to open just one resistance of vb application (.exe).

  • Q : Print the factors of each perfect number

    An integer number is said to be a perfect number if its factors, including 1 (but not the number itself), sum to be the number. For example, 6 is a perfect number because 6 = 1+ 2+ 3. Write a function perfect that determines if parameter number is a perfect number. Us

  • Q : Define Class inheritance Class

    Class inheritance: Whenever a super class is expanded through a sub class, a class inheritance relationship exists among them. The sub class inherits the attributes and methods of its super class. Class inheritance in Java, is single

  • Q : Explain the term XForms Explain the

    Explain the term XForms.

  • Q : Explain the term Test Fusion Report of

    Explain the term Test Fusion Report of QTP?

  • Q : Explain Window manager Window manager :

    Window manager: This is a window manager which provides a computer user with a virtual desktop having one or more windows and working regions in which individual programs might be run. Window managers permit the contents of a user's desktop to be arra

  • Q : What is Class body Class body : It is a

    Class body: It is a body of class definition. The body collects the definitions of a class's members that is, methods, fields and nested classes.