Answer the question
In order to leave comments, you need to log in
What is the best way to store an ArrayList?
In the application, some progress is stored in an ArrayList, then it needs to be saved. I chose .txt as the simplest, but when loading the saved words, characters like [
,
, are added to them, which makes the list not valid.
SQLite just started to smoke and I don’t understand how to drive List into it. What is the best way to save? If through the database, then please tell me how to implement it. If through a text editor, how to remove extra characters.
Answer the question
In order to leave comments, you need to log in
Maybe wrike then, a cute design, a lot of lessons, Russian language support
, here is part of the integration
https://www.wrike.com/help/knowledge-base/integrations/
Array to JSONArray, JSONArray to String and DB.
When reading, the process is reversed:
A string from the database to a JSONArray, and that one to an array.
If you have a key-value dictionary, then JSONObject will do.
There are multiple classes for json, usually GSON.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question