Need help in choosing Collection type <p>I need to return a file ID (<code>Integer</code>) and success or fail (<code>boolean</code>) values from a method. I have 3 options in my mind.</p> <p>One is to convert the both the values String and make the return type as <code>ArrayList</code>.</p> <p>The second option is to use the <code>HashMap</code>. Since those both values doesn't have any dependency I am not sure whether I can use this type or not.</p> <p>Third one is to convert both into String objects and return a comma separated string.</p> <p>Please suggest me which one is the better solution for me.</p>