Showing posts with label Constants. Show all posts
Showing posts with label Constants. Show all posts

Tuesday, May 28, 2013

Constants

As the name suggests Constants are a type of class members whose value is defined at the time of writing the program and remain constant forever, the values of constants cannot be changed at runtime, the values of a constant defined in a class will remain same for every instance that is created from the class.

Constants are declared using the
const keyword as follows.