Now I am creating a loading of classes that will contain my configuration, and that’s all. All I do is save the values from the configuration file.
More than half of the code is getters, and I wonder if the practitioner still has getters or just access to the variables directly.
So this is:
public myClass { public myClass(String name) { this.name = name; } final String name; public final String getName() { return name; } }
Or:
public myClass { public myClass(String name) { this.name = name; } public final String name; }
It seems really stupid to have all the getters there when they actually do nothing but return a variable. But I was told that the usual practice of Java is that the recipient still has it.
source share