Magic Strings
Magic strings are String
values that are specified directly within application code that have an impact on the application’s behaviour. Frequently, such strings will end up being duplicated within the code.
Avoid hard-coded Strings
Best practice
Create a class which contains all the String
values for a given pick list
And then used this class to access the single instance of the String
value.
Last updated