Friday 15 March 2013

controversy on java final keyword:


controversy on java final keyword:

‘final’ should not be called as constants. Because when an array is declared as final, the state of the object stored in the array can be modified. You need to make it immutable in order not to allow modifications.  In general context constants will not allow to modify. In C++, an array declared as const will not allow the above scenario but java allows. So java’s final is not the general constant used across in computer languages.



Blog Author: Vijay Kumar

Go to: Coding Problem Solutions

No comments: