wood burning stoves*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes how to do collection???? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "how to do collection????" Watch "how to do collection????" New topic
Author

how to do collection????

himanshu kesarwani
Ranch Hand

Joined: Aug 27, 2008
Posts: 84
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. ............!!


SCJP 5
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
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

Joined: Aug 27, 2008
Posts: 84
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!!
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

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]


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
himanshu kesarwani
Ranch Hand

Joined: Aug 27, 2008
Posts: 84
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

Joined: Aug 03, 2008
Posts: 9291
    
  17

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...
Cristian Senchiu
Ranch Hand

Joined: Feb 08, 2009
Posts: 40
If you want to learn collections start with SUN's tutorial on collections
Sanjay Singhaniya
Greenhorn

Joined: Feb 21, 2009
Posts: 25
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to do collection????
 
Similar Threads
Generics
Generics
generics
Generics
Generics