answersLogoWhite

0

Accessors: getValue

Mutators: setValue

Example:

class MyClass {

int num;

int getNum() {

return num;

}

void setNum(int num) {

this.num = num;

}

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What layer does the encapsulation method takes place?

If you want maintainability, flexibility, and extensibility (and I guess, you do), your design must include encapsulation. How do you do that? • Keep instance variables protected (with an access modifier, mostly private). • Make public accessor methods, and force calling code to use those methods rather than directly accessing the instance variable. • For the methods, use the JavaBeans naming convention of set and get.


Specify the naming convention for variable constant class and method?

The naming convention for variables, constants, classes, and methods involves delimiting separate words with a non-alphanumeric character such as a hyphen or underscore.


What extension saves an external style sheet?

When you create an external style sheet for your Web pages, you should name the file following similar naming conventions for your HTML files. When you save it, you use the file extension .css so the browser will recognize that it is a CSS stylesheet.


How do we name function?

Functions are typically named using descriptive identifiers that convey their purpose or action. A common convention is to use verbs or verb phrases that indicate what the function does, often in camelCase or snake_case format (e.g., calculateTotal or calculate_total). It's important to avoid vague names and ensure consistency in naming across the codebase to enhance readability and maintainability. Additionally, following language-specific conventions and guidelines can help in naming functions appropriately.


What is another name for a javascript variable?

Another name for a JavaScript variable is an "identifier." Identifiers are names given to variables that allow developers to reference and manipulate data stored in those variables throughout their code. They must follow specific naming conventions and rules defined by the JavaScript language.

Related Questions

How do you explain the naming conventions used to identify internet host company?

Naming conventions are used to identify ip addresses and things of that nature. They use various system names and methods for each different naming convention.


What are text conventions?

slogans, branding and product naming.


What two functions of encapsulation?

If you want maintainability, flexibility, and extensibility (and I guess, you do), your design must include encapsulation. How do you do that? • Keep instance variables protected (with an access modifier, mostly private). • Make public accessor methods, and force calling code to use those methods rather than directly accessing the instance variable. • For the methods, use the JavaBeans naming convention of set and get.


What are the two methods of naming sets?

what are the two method naming sets


What layer does the encapsulation method takes place?

If you want maintainability, flexibility, and extensibility (and I guess, you do), your design must include encapsulation. How do you do that? • Keep instance variables protected (with an access modifier, mostly private). • Make public accessor methods, and force calling code to use those methods rather than directly accessing the instance variable. • For the methods, use the JavaBeans naming convention of set and get.


How do you determine the naming conventions for amino acids?

Amino acids are named based on their chemical structure and properties. The naming conventions typically involve using a combination of letters and numbers to represent the specific characteristics of each amino acid.


What are naming conventions in active directory based on?

LDAP (Lightweight Directory Access Protocol)


What is the common use for carbohydrates?

In organic chemistry naming conventions, carbohydrates have -ose as the suffix.


How are chords named and what is the significance of their naming conventions?

Chords are named based on the notes they contain and their relationship to the root note. The naming conventions help musicians understand the structure and function of chords in a piece of music, making it easier to play and analyze.


What does the abbreviation 'TLD' stand for?

Top Level Domain in Internet domain naming conventions/protocol.


Naming or addressing conventions in active directory are based on the?

LDAP (Lightweight Directory Access Protocol)


How can one determine the naming conventions for hydrates?

To determine the naming conventions for hydrates, one must identify the compound's chemical formula and the number of water molecules attached to it. The naming convention typically involves stating the name of the compound followed by a numerical prefix indicating the number of water molecules present, and ending with the word "hydrate."