Deepak Lal wrote:In which scenario can i use the below Collections (can you give me a real time example where i can apply the below Collections Frammework and Why ?)
Hello! Your post shows a homework vs interview vs certification question, but you haven't shown your thoughts on a solution yet, and this is critical in helping us identify what you know and what you're confused on. Please read these sections of the FAQ for more on this: ShowSomeEffort, DoYourOwnHomework, NotACodeMill, TellTheDetails
I know the below concepts,BUT i want to know some REAL TIME EXAMPLES for the below where they can be used.
a>ArrayList -- Unsynchronized Data Structure
b>Linked List is based on Doubly linked List Data Structure
c>Vector -- Synchronized Data Structure
d>HashMap -- Unsynchronized Data Structure
e>HashTable -- Synchronized Data Structure
f>Queue -- Based on Dequeue Data Structure
I wanted some real time scenarios where the above said Collections can be applied in Java Based Applications.Could you please advice/Suggest now.?
these are actually very basic data structures that should be known to any programmer and they exist since the dawn of programming. There is nothing really special about them. It is a bit like asking illustrations for the use of + or * operators. Which scenario is best to illustrate multiplication?
There are hundreds of Lists, Sets or Maps in my current project. However none of them is so special as to serve as a good illustration, better than simple description 'this is a list of contracts', 'this is a map of customer ids to customers' or 'this is a set of refused identifiers'. However, to get the basic image, I'd strongly suggest to thoroughly read this tutorial: http://download.oracle.com/javase/tutorial/collections/interfaces/index.html. (I read this myself when I started using Java.)
The best way to get familiar with these structures is to use them in real code. If you have a question then, it will probably be 'which data structures to use in this situation I have', and that would be probably answered pretty well on this forum.