I am trying to understand what happens if I reassign a value to array element which is final, this is the code :
public class XYZ {
private static final
The final
keyword does not mean you cannot change the state of the object, but only that the reference marked as final
will remain constant. For example, you won't be able to do things like
final String[] ABC = {"Hello"};
ABC = new String[3]; // illegal
ABC = someOtherArray; // illegal;
ABC[0] = "World"; // legal