Static Variable:
1.Variable set at run time
2.Can be assigned for reference types.
3.Initialized on constructors
Constant:
1.Variable set at compile time itself.
2.Assigned for value types only
3.must be initialized at declaration time
4.only primitive data types.
No comments:
Post a Comment