Map, Set use cases in a general web app

Posted by user2541902 on Programmers See other posts from Programmers or by user2541902
Published on 2013-11-11T03:13:40Z Indexed on 2013/11/11 4:11 UTC
Read the original article Hit count: 225

I am currently working on my own Java web app (to be shown in interview to get a Java job). So I've not worked on Java in professional environment, so no guidance.
I have database, entity classes, JPA relationships. Use cases are like, user has albums, album has pics, user has locations, location has co-ordinates etc. I used List (ArrayList) everywhere. I can do anything with List and DB, get some entry, find etc. For example, I will keep the list of users in List, then use queries to get some entry (why would I keep them in Map with id/email as key?). I know very well the working and features, implementing classes of Map, Set. I can use them for solving some algorithm, processing some data etc.
In interviews, I get asked have you worked with these, where have you used them etc. So, Please tell me cases where they should be used (DB or any popular real use case).

© Programmers or respective owner

Related posts about java

Related posts about web-development