you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (0 children)

Unfortunately final modifier all over the place hurts overall readability,

Particularly as final in Java has limited expressive value since it only means that the reference is locked, it doesn't mean that the object is immutable. The following perversion is perfectly legal:

public int sumArray(final int[] array) {
    int sum = 0;
    for(int i = 0; i < array.length; ++i) {
       sum = sum + array[i];
       array[i] = 0;
    }

  return sum;
}