Reputation: 71
public class MyConstant {
public static final String COMMA = ",";
public static final String EMPTY = "";
}
I learned using constant the reason why dont use permgen memory and removing repeatability and clean code.
And i heard java8 about removed permgen memory.
So java8 still need constant without repeatability and clean code?
Or have another reason why use constant?
Upvotes: 1
Views: 176
Reputation: 86774
You use named constants (and enums) in Java for at least two and probably more reasons:
Upvotes: 3