Java – an external file of strings, not hard coded
•
Java
I have experience developing Android applications that can easily store strings using XML string files The last time I developed a desktop Java application, I hard coded strings (such as button titles, labels, etc.) I already know that this is not a good practice. I should store the string in a file
I don't know what to do
>I am currently developing in eclipse Should I paste a text file in the project folder? > Is this the standard? > How do you find this file in your code?
Solution
Yes, you should Properties files and access them using resourcebundle
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码