Select from following answers:- Constant fields or local variables must be assigned a value at the time of declaration otherwise gives compile-time error.
- By default constant are static.
- We cannot define a constant type as static.
- Constant variables can be accessed by class name directly.
- All Above
Above all statements are correct.
For Example:-
public const string CAN_APPROVE = "Y";
public const string USER_STATUS_ACTIVE = "AA";
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator