I want to store variables in a text file (not as an object).my problem is that the class contains ArrayList of another type ,and I wrote one method to store the member variables of my class in "file.txt" ,but I don't really know how to write the ArrayList variable in the same file (actually in the same line in that file).
I think of writting another method that write the arrayList variable but how to point to the same file and to the appropriate line? and what about reading that field?
Jump to Post
I want to store variables in a text file (not as an object)
Can you explain what you want to do?
Text files usually contain Strings. If you want to write values of some String variables to a file that should be no problem.
You won't be able to write …
All 4 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.