• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to do collection????

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am very very confused about collection and generics,
i did generics very well from herbert shildt,
even now i am not getting collection well.
i have no previous knowledge of collection!!
so directly reading k&b will be dangerous....
even its not that simple like other chapters.
so,how should i do it!!
just the problem is that i havent did collection before. ............!!

 
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dude, your question seems to be very very very generic... until and unless you specify which part of the collection framework you are uncomfortable with...
or atleast present a scenario, I dont think we'll be able to help you....
 
himanshu kesarwani
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am completely new to collection thats my problem i dont know even well what is collection.......!!
so kindly tell me just doing k&b directly will i get every thing!!
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well to understand collections, you'll have to understand the meaning and use of the collection interfaces. You'll have to understand the hierarchy. Collections can be divided into two categories

Collection and Map

Collection is for storing a number of values while map is for storing key value pairs.

Collection can be further divided into List and Set. List is used to have an ordered list of elements. While Set is used to have a list of unique elements which may be unordered. Maps always have unique keys while the values can be repeat.

Then coming down to the hierarchy, all these types are further divided into sub parts. List into ArrayList, LinkedList and Vector. Set into HashSet, LinkedHashSet and TreeSet. Map into HashMap, LinkedHashMap, Hashtable and TreeMap. The TreeSet and TreeMap contains sorted elements while LinkedList, LinkedHashSet and LinkedHashMap store a doubly linked collection of elements (read this to know about linked collections)...

[edit: added something about maps]
 
himanshu kesarwani
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i m telling the list of topics i am going to cover up from complete reference 6,
1.collection interfaces:
list and set interface,sortedset,navigableset,queue,deque.

2. Collection class
arraylist,hashset,linkedhashset,treeset,priorityq,arraydeque,enumset.

3.map
map interface,navigablemap interface,map class

comparators,generic collection,vector ,stack,dictionary,hashtable,properties,store(),load()


.........this is what is there in complete reference 6.
how many of these are irrelevent to topic and what i still miss here!!
 
Ankit Garg
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

himanshu kesarwani wrote:i m telling the list of topics i am going to cover up from complete reference 6,
1.collection interfaces:
list and set interface,sortedset,navigableset,queue,deque.

2. Collection class
arraylist,hashset,linkedhashset,treeset,priorityq,arraydeque,enumset.

3.map
map interface,navigablemap interface,map class

comparators,generic collection,vector ,stack,dictionary,hashtable,properties,store(),load()


.........this is what is there in complete reference 6.
how many of these are irrelevent to topic and what i still miss here!!



The things I have marked bold are not in the objectives of SCJP. The thing marked in red doesn't exists . And I think you'll miss a lot of things. I can't see any of the collection implementation classes i.e. LinkedList, TreeMap, TreeHashSet ..............etc. There is also no mention of Collections class which has utility method related to collections. There might be even more which I missed...
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to learn collections start with SUN's tutorial on collections
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To study for SCJP exam, you should read a SCJP study guide which focusses on SCJP syllabus. By using complete reference, you are not targeting your efforts towards the exam.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic