answersLogoWhite

0

Symbolic constants are named constants

like :

final double PI = 3.14 ;

They are constants because of the 'final' keywords, so they canNOT be reassigned a new value after being declared as final

And they are symbolic , because they have a name

A NON symbolic constant is like the value of '2' in expression

int foo = 2 * 3

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is symbolic constants?

Symbolic constants are constants that the programmer has decided to give a symbolic name (usually one with a meaning to make it easy to remember) so he does not have to retype the numeric value every time he needs it and risk making an error. Many coding standards require ALL constants to be symbolic constants, even if only used once in the program.


What are symbolic constants?

A symbolic constant is a constant with a name, numeric constants are unnamed and must be retyped in the code on each usage. Generally use of symbolic constants is preferred as it makes the code self documenting and allows the compiler to catch typing errors in constant usage.


What is the definition of symbolic constants in c language?

constants are values that does not chnage through out the program exceution..


What is literal constants and symbolic constants?

Literal constants are fixed values that do not change during the execution of a program, such as numbers (e.g., 5, 3.14) or strings (e.g., "Hello"). Symbolic constants, on the other hand, are named identifiers that represent a value, which can improve code readability and maintainability; for example, using PI to represent the value of 3.14. While literal constants are directly written in the code, symbolic constants are defined using keywords or specific syntax in programming languages, often in uppercase to distinguish them.


What kind of constructs can be declared in a Java interface?

Constants and abstract methods. That's it.


What is the symbolic form made up of constants variables and operations?

It is an expression.


What keyword is used to declare a named constant?

Constant in Java refers to a fixed value that doesn’t change during the execution of a program. The value of constants appears right in a program. It is also known as Literals. We use the constants to create values that assign to variables. Constants can make our program easy to read and understood by others. Java does not directly support the constant. To define a variable as a constant, We use the “Static” and “Final” Keywords before declaring a variable. Hope this helps. Thank you


What happen if you declare class as recursive?

It will get a compiler error in Java.


How do you prevent extending a class in java?

You can declare a class as "final".


How do you declare symbolic constant?

In programming, a symbolic constant is typically declared using the const keyword in languages like C, C++, or Java, or with final in Java. For example, in C++, you might write const int MAX_SIZE = 100;, indicating that MAX_SIZE is a constant integer with a value of 100 that cannot be changed. In Python, you can simply define a variable in uppercase, like MAX_SIZE = 100, by convention to signify that it should be treated as a constant, though it is not enforced by the language.


What are the 'Constants' and 'Variables' in Java?

A variable is a memory address that holds a value. A constant is simply a variable that does not change value.


What do mean by interface in java?

An interface in Java is like an abstract class, but there are no method bodies allowed in it and it has to be declared with the interface keyword. It is Java's way of getting around the Deadly Diamond of Death. Only abstract methods and constants are allowed in it.