--%>

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 : 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 : Define Final variable Final variable :

    Final variable: A variable with final reserved word in its declaration. The final might not assigned to once it has been initialized. Initialization frequently occurs as a part of its declaration. Though, the initialization of an uninitialized final f

  • Q : Define Arithmetic operator Arithmetic

    Arithmetic operator: The Operators, like +, -, *, / and %, which generate a numerical outcome, as a part of an arithmetic expression.

  • Q : Top command Specify, what does the top

    Specify, what does the top command displays?

  • Q : Define the term Interface inheritance

    Interface inheritance: Whenever a class implements an interface, the interface inheritance relationship exists among them. The class inherits no implementation from interface, just method signatures and static variables. It is as well possible for one

  • Q : How Java client access Corba A Corba

    A Corba remote object exists. How could you get a Java client to access this object?

  • Q : Use of setjmp and longjmp Use of

    Use of setjmp() and longjmp(): In C/C++, setjmp() saves the contents of the registers at a particular state in the program and longjmp() will restore that state later. In this way, longjmp() “returns” to the state of the program when setjm

  • Q : Explain the CPU scheduling decisions

    Explain the CPU scheduling decisions.

  • 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