A const may be applied in an object declaration to indicate that the object, unlike a standard variable, does not change. Such fixed values for objects are often termed literals. In some languages (the C family, for example) const is part of the type while in many others it is part of the object.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
Types of constants include: integer literals, floating point literals, character constants and string literals. While constants are often unwritable as predefined data in C, const generally does not make the value as stored in RAM unwritable. As such, const defines more how a programmer should code rather than how they can code.
In Java, const is a reserved keyword but not used.