list with unique Strings
in
Programming Questions
•
1 year ago
I'm interested in a list with unique Strings.
I could use a HashMap with:
- HashMap<String, String > hm_questions = new HashMap<String, String >();
But then it would store the same thing twice which looks stupid to me.
I also could use a ArrayList and loop over every time i add something to see if it exists but that sounds slow and also incorrect.
What would a proper way be?
1