ReadOnly variable can be declared without assigning a value to it.
Constant variable can only be declared with assigning a value to it.
ReadOnly variable can be assigned in constructor or in object intialization.
Constant are same, cannot be modified anytime.
No comments:
Post a Comment