answersLogoWhite

0


Best Answer

A constant value.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What value cannot be changed once it is initialized?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Can static variables be changed?

No, a static variable means that there is only one copy of that variable, and it is shared by all members of the class, or by all callers of a function.A variable that is read-only would be marked as const or final (depending on language).


Why use final in java?

The use of final denotes that a variable is a constant. For example: final int PI = 3.14; makes PI a constant. This is useful because now PI can't be changed, even accidentally, by you, the program, another programmer, or a user. Once a value is final, it is permanent, and can be used as a constant. Note: usually programmers capitalize the names of constants, just to make it clear that the value is a constant.


What is difference between System.String and System.StringBuilder classes?

String and StringBuilder classes are used to store string values but the difference in them is that String is immutable (read only) by nature, because a value once assigned to a String object cannot be changed after its creation. When the value in the String object is modified, a new object is created, in memory, with a new value assigned to the String object. On the other hand, the StringBuilder class is mutable, as it occupies the same space even if you change the value. The StringBuilder class is more efficient where you have to perform a large amount of string manipulation.


What is a specifier?

a specifier tells the JVM how to treat a particular class,method and variable while executing the program. For example, final classes cannot be extended and final methods cannot be overriden and final variables cannot be changed once declared. Likewise,static methods and variables can be accessed without having to instantiate an object for their class


Which variable is use for create for read only variable?

That really depends on the language. Some languages have "constants" separate from "variables"; in Java, for example, the "final" keyword is used to have a variable that can't be changed once it is assigned a value.

Related questions

Can static variables be changed?

No, a static variable means that there is only one copy of that variable, and it is shared by all members of the class, or by all callers of a function.A variable that is read-only would be marked as const or final (depending on language).


What is a constant object in c plus plus?

A constant object is one that, once initialized, never changes value.


Differentiate between C Constants and C variables?

A constant value cannot be changed once set. A variable can be changed whenever you want.


What are the difference between private variable and final variable?

A private variable is one that is accessible only to the current class and cannot be accessed by any other class, including the ones that extend from it. A final variable is one that cannot be modified once it is initialized and assigned a value.


Which variable is initialized once when program is compiled?

global and static


What is the constant of the variable?

The definition of constant variable is a variable whose value cannot be changed once it has been assigned a value for an experiment. It is the variable held steady, or constant, for a specific experiment.


How are constants and variables different?

Constants are values that remain constant and cannot be changed once they are assigned a value. Variables, on the other hand, can have different values assigned to them and their value can be changed throughout the program. Constants provide a fixed value, while variables provide flexibility and allow for changes in value.


What are final variable?

Declaring a variable with the final keyword makes it impossible to reassign a different value to that variable once it has been initialized with an explicit value (notice we said explicit rather than default). For primitives, this means that once the variable is assigned a value, the value can't be altered. For example, if you assign 10 to the int variable x, then x is going to stay 10, forever. That's pretty straightforward for primitives, but what does it mean to have a final object reference variable? A reference variable marked final can't ever be reassigned to refer to a different object. The data within the object can be modified, but the reference variable cannot be changed. In other words, if you have a final employee object variable, you can modify aspects of the employee but you cannot have the variable refer to say a manager.


Why are there 2 tiles with no points on them in Words With Friends?

They are blank tiles, you can choose any letter for them however they have no point value. Once you designate the letter to the tile it cannot be changed, exactly like Scrabble.


What is a computer language constant?

A constant is a primitive or complex object that does not vary. That is, once instantiated, its immutable members cannot be changed.


If a contract is changed without the knowledge of the guarantor is it valid?

A contract is valid when there is a meeting of the minds. Once a contract is signed, it cannot be changed unless written as an addendum and signed by all parties concerned. A verbal agreement cannot override a written agreement.


How can you change your id?

Make sure you pick a name you really like because once you have picked a name it cannot be changed. Sorry!