magic number - permalink
All > Technology > Programming > Java
- A constant value with a significance within a particular context. For instance, the value
12could mean many different things - the number of hours you have worked today, the number of dollars you are owed by a friend, and so on. As far as possible, such values should be associated with an identifier that clearly expresses their meaning.final int maxSpeed = 50;
If stored in a final variable, it is unlikely that any execution overhead will be incurred by doing so.
David J. Barnes - Cite This Source - This Definition - Browse Related Terms: Boolean, CAST, implicit type conversion, out-of-bounds value, redundant value, Toggle, value-binding expression