|
|
|
|
|
by lanna
400 days ago
|
|
You just made TWO typos: "display-name" vs "display_name" and "_name" vs "name", automatically counter-argumenting your point. It is also for documentation. With the declared constants, we know all possible values. With plain strings, how am I supposed to know which values to use? The benefits far outweigh the marginal cost. |
|
In the specific android example, I would put it here. Under projection params where it takes in all the Images.Media.* string consts.
https://developer.android.com/reference/android/content/Cont...
Though, if it's a practice of Java Engineer to document allowable enum like string as a constant, then I can say that's a valid argument.