View All Collections

View All Collections


Advise for a fresher

Do not expect command on Java DS overnight. It is ocean, until and unless not properly approached, it leaves in a very great confusion, of course without pointers (feeling of when you lost alone in an unknown forest). It is a ocean due number of classes, and these classes are given to make your programming easy (not to confuse you). I feel the following is a better way to penetrate into DS; follow the following order of reading.

    A) General Programs

  1. Collections Framework
  2. Collections Interfaces Hierarchy
  3. Interface Collection

  4. Stack
  5. Generics Stack

  6. Vector Methods
  7. Vector Generics
  8. Vector Retrieval
  9. Vector Play With

  10. Hashtable About
  11. Hashtable General
  12. Hashtable Generics
  13. Hashtable Special

  14. Properties

  15. List Fundamentals
  16. List Methods
  17. List Iteration
  18. List Reversing Sorting
  19. List Unique Elements

  20. Queue Fundamentals
  21. Queue Programming

  22. ArrayList Introduction
  23. ArrayList Methods
  24. ArrayList Iterators
  25. ArrayList Operations
  26. ArrayList Special
  27. ArrayList of arrays
  28. Array of Array Lists

  29. LinkedList Tutorial
  30. LinkedList General
  31. LinkedList Special
  32. LinkedList Iterators

  33. interface Set Tutorial

  34. HashSet Tutorial
  35. HashSet General
  36. HashSet Operations

  37. interface SortedSet

  38. TreeSet Tutorial
  39. TreeSet General
  40. TreeSet Special

  41. interface Map Tutorial
  42. interface Map Methods

  43. HashMap Tutorial
  44. HashMap Genreral
  45. HashMap Iteration
  46. HashMap Sort

  47. interface SortedMap Tutorial

  48. TreeMap Tutorial
  49. TreeMap General
  50. TreeMap Special

B) Elements Iteration (retrieving and printing the elements)

Enumeration Iterator
ListIterator Arrays foreach
Collections foreach Enumeration vs Iterator
Iterator vs ListIterator
    C) Elements sorting Customization

  1. interface Comparable
  2. Comparable Example
  3. interface Comparator
  4. Comparator Example
  5. Comparable vs Comparator
    D) Elements Manipulation made easy. Boon to Programmer

  1. Reversing elements with reverse()
  2. Count of same element existance with frequency()
  3. Replacing elements with replaceAll()
  4. Finding Min and Max values with min() and max()
  5. Sorting ArrayList with sort()
  6. Sorting ArrayList with Comparator
  7. Searching an element with binarySearch()
  8. Copying one list to another with copy()
  9. Swapping two elements with swap()
  10. Shuffling the elements randomly with shuffle()
  11. Rotating elements with rotate()
  12. Filling List elements with fill()
  13. Existence of Common Elements with disjoint()
  14. Adding Array to Collections classes with addAll()
  15. Finding Sublist Index with indexOfSubList()
  16. Immutable Collection with unmodifiableCollection()
  17. Thread-safe Collection with synchronizedCollection()
  18. Type-safe Collection with checkedCollection()
  19. Enumerated Collection with enumeration()
  20. Enumeration to ArrayList with list(Enumeration)
  21. Immutable List with nCopies()
  22. Singleton List with singletonList()

    Would you like to know similar operations on array elements? Array elements manipulation made easy.

    E) Miscellaneous. Makes you away from confusions. Important for interviews.

  1. DS features added in JDK 1.5

  2. Vector vs ArrayList
  3. ArrayList vs LinkedList
  4. Array and ArrayList

  5. Set vs HashSet
  6. HashSet vs TreeSet

  7. Map vs HashMap
  8. Hashtable vs HashMap
  9. HashSet and HashMap
  10. HashMap vs TreeMap

  11. Comparable vs Comparator

  12. Enumeration vs Iterator
  13. Iterator vs ListIterator

9 thoughts on “View All Collections

  1. bikash

    Hi,

    I have a employee object.Using which collection class/interface we can sort the employee name in descending order ? i.e requirement is sorting in descending order by emplyee name ?

    Please help with the code.

    Thanks & Regards
    Bikash

  2. Bhalchandra

    Hi Sir,
    Please can you update me how to read the registry using java concepts.
    like example: I want to read from below:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyRegistry

    “MaintenanceMode”=”FALSE”
    “DatabaseQueryTimeOut”=”30”
    “MaxNoOfLinesForRecording”=””
    “LeanPeriodEnabled”=”FALSE”

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyRegistry\Common]
    “NoOfLogFiles”=”20”
    “LogFileSize”=”40”

    Thanks,
    Bhalchandra

Leave a Reply

Your email address will not be published. Required fields are marked *