Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have to create array lists of objects based on the information from a text file.

The text file structure is:

name1, attribute

name2, attribute2

In this case, I have to read the text file and create 2 array lists named "name1" and "name2" with their respective descriptions but the name of the array lists can change based on the text file used.

What would be a way to accomplish this ?

share|improve this question

put on hold as too broad by wumm, Nathaniel Ford, Emrakul, Alexandre Santos, Rashad-The Birthday Boy 12 hours ago

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
By trying to write some code. –  christopher 20 hours ago
    
BufferedReader, read lines, split at ,, trim items, add them to the correct array list... Godness, I told you more than I have should –  wumm 19 hours ago

Browse other questions tagged or ask your own question.