Explain Magic number

Magic number: It is a constant value with significance within a specific context. For example, the value 12 could mean numerous different things - the number of hrs you have worked today, the number of dollars you are payable by a friend, and so forth. As far as possible, these values must be related with an identifier which clearly expresses their meaning.

final int maxSpeed = 50;

When stored in a final variable, it is improbable that any execution overhead will be acquired by doing so.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.