"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.
Constants and abstract methods. That's it.
Integer constants Character constants Real/floating point constants String constants
A variable is a memory address that holds a value. A constant is simply a variable that does not change value.
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.
An interface can only have abstract methods or constants in it. A class can have both that and everything else 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 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.
In Java toUppercase() is a method of the class String: https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#toUpperCase()
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
constant is does not change the value of during the excution of programvariable it changes the value during the excution of program
The Math class has public variables - defined as final, of course - for the mathematical constants PI and E.
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