What will happen if you try to set a value to a constant once it has been declared?
A. The value of the variable will change
B. The value of the variable will not change
C. Parse Error
D. Nothing
Answer:A
What will happen if you try to set a value to a constant once it has been declared?
A. The value of the variable will change B. The value of the variable will not change C. Parse Error D. Nothing
Explanation:You should use constants when your property needs to be available across all instances of a class, and when the property value needs to be fixed and unchanging.