--%>

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 : Type promotion rule Q. Explain type

    Q. Explain type conversion rules for basic data types in java. Ans. Type promotion rule: Java automatically each bits or short operant to int when evaluating an expression. As usual as the automatic promotion

  • Q : How would you extract an exact

    How would you extract an exact attribute by using XSLT, from an element into an XML document?

  • Q : Describe Timers Timers: While time

    Timers: While time values usually cannot be reduced in the target system, their usage can be encapsulated as an abstraction which can be replaced easily (e.g., by a non-deterministic choice) during model checking.

  • Q : What is Super class Super class: It is

    Super class: It is a class which is extended by one or more sub classes. All Java classes encompass the Object class as a super-class.

  • Q : Explain myriad of computer systems of

    Explain myriad of computer systems of your target users?

  • Q : Component which are used in 2nd layer

    What are the different types of component parts which are used in 2nd layer?

  • Q : Explain Program counter Program counter

    Program counter: A program counter is an integral portion of a computer's Central Processing Unit. It includes a reference to the memory address of the subsequent instruction to be fetched, ready to be executed throughout the next fetch-execute cycle.

  • Q : Define the term Peripheral devices

    Define the term Peripheral devices: It is the devices attached to a computer, like disk drives, printers, mice, and so forth.

  • Q : Criticizing CORBA technology Criticize

    Criticize the process by which the CORBA technology was designed and implemented.

  • Q : Define the term Critical section

    Critical section: It is a section of code in which there is potential for a race hazard. The critical sections made use of the synchronized statements or methods.