Note:-

0
23

-It is mandatory to initialize a constant variable at the time of its declaration.

-the behavior of a constant variable is same as the behavior of static variable i.e. maintains one and only one copy in the life cycle of a class & initialize immediately once the execution of class start.(object not required).

-The only difference between a static and constant variable is that the static variable can be modified but constant variable cannot.

SHARE
Previous articleConstant Variable:-
Next articleRead only Variable:-