Constant means fix value we cannot change or we can say it’s a unchangeable value. Constant values are used in the program we cannot change the value during execution.After the initialize of the variable we can set constant value to the variable like this…….int a; a=12;
The final modifiers
Final modifier is very versatile
- When the final modifier is applied to any class, it means that the class cannot be subclassed
- When it is applied to any variable, it means that the variable is constant.
- When it is applied to any method, it means that the method cannot overridden by sub classes.
Good is a subjective criteria and denotes situation whereby a program can completely meet with all the user specifications and run without error under all given circumstances. Good programming is the practice of constructing and implementing quality programs within an acceptable time span. Once the program is written, they are used in their operating environment for a period which may span ten or more years .During this period of time, programs will be subject to any alternations or enhancements to reflect changing needs of users.
A program is a set of instructions to be executed by the computer to accomplish a particular task. While writing a program one has to take care of data which the program will process and generate information.
Variable is the name of the memory location from which we store the value .This is clear in above example.A name that holds a value.We can use variable to represents data.
Before we talk about data type first we know about variable because data type is used with variable. Without variable the meaning of the data type is nothing, it's incomplete. Data types are used when you create variable in the program. Each variable is assigned a data type.