Qus:    How constant and read only will be different from each other?
Dec 07, 2020 15:28 2 Answers Views: 91 RAMU

Const cannot change the value and even latter module also.

Readonly constant can be change at the runtitme .



1. ReadOnly is a runtime constant while Const is a compile time constant.

2. The value of readonly field can be changed at runtime whereas the value of the const field can not be changed.

Prev Next
Answers (2)
SHIVA Dec 08, 2020 08:29
Answer:   Const cannot change the value and even latter module also.
Readonly constant can be change at the runtitme .

PARTH Dec 09, 2020 07:06
Answer:   1. ReadOnly is a runtime constant while Const is a compile time constant.
2. The value of readonly field can be changed at runtime whereas the value of the const field can not be changed.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect