The advantage of using this approach is that the arrays cannot be modified (because they are final
), however, their content can be changed.
A useful example is that you can use these arrays and modify their first entry in anonymous inner classes without having to make them (static
) fields.
As stated in the comments above, another use-case is that this array can be used to pass it to a method expecting an array type.