As far as I see, final is commonly used comparing to the same situations in C#
. There is no final in C#
, but sealed
is not heavily used like this. So, can we say that; if the value will not be changed, or at least we are sure, then we should use final
for all the situations e.g. variable definitions, parameters, ...?
private final Integer LIMIT = 10;
private final String NAME = "John";
or
default Optional<EmployeeDTO> findByUuid(final UUID uuid) {
...
}
And should we use capital letters for the final variable names as constant
values?