answersLogoWhite

0


Best Answer

"real" numbers, in any programming language, are actually approximations of what is called a "real number" in math. Basically, a number that can handle decimals - but unlike the actual real numbers, of limited precision.

In Java, the "real" data types are float, and double. double has greater precision.

A "constant" in Java is similar to a variable, but its value can't be changed after it has been assigned a value.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are real constants in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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

Constants and abstract methods. That's it.


Explain different types of constant?

Integer constants Character constants Real/floating point constants String constants


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.


What is the major difference between an Interface and a Class?

An interface can only have abstract methods or constants in it. A class can have both that and everything else in Java.


What is the use of api in java?

The API is a reference for all predefined classes provided by the java language. This will allow the programmer to utilize the classes into their programs. The API provides packages, classes, methods, constants, etc.


Enum in java?

Enum in java is a keyword which is introduced in JDK 1.5 and its a type like Interface and Class.Enum constants are implicitly static and final and you can not change there value once created. Enum in Java provides type-safety and can be used inside switch statment like int variables. Since enum is a keyword you can not use as variable name and since its only introduced in JDK 1.5 all your previous code which has enum as variable name will not work and needs to be refactored.


Attributes and methods of uppercase in java?

In Java toUppercase() is a method of the class String: https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#toUpperCase()


How do you declare symbolic constants in Java?

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


What is the difference between variables and constants in java?

constant is does not change the value of during the excution of programvariable it changes the value during the excution of program


Name a common Java library class that has public instance variables?

The Math class has public variables - defined as final, of course - for the mathematical constants PI and E.


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