Whenever you declare a variable or constant, you are writing a declarative statement. You can also assign the values to variables at the time of declaration of variables. Assigning values to variables at time of declaration is an optional task, but constants are required to assign values at the time you declared them.