View RSS Feed

Recent Blogs Posts

  1. Sorting Collections

    by , 11-29-2011 at 05:23 PM
    If you are interested in sorting your collections, the good news is that since the inception of Java 5 it is now possible for collections and arrays to be sorted. This is very useful because it is a hell of a lot easier to find something in a sorted set than in an unsorted set. There are a number of sorting algorithms that can be used for your collections. There are listed below.
    • Bubble Sort algorithm
    • Bi-direction Bubble Sort algorithm
    • Quick Sort algorithm
    • Generic Sorting algorithm
    ...
    Categories
    Tutorial , Sorting
  2. Java ArrayList : Generics & Sorting

    by , 07-21-2011 at 06:20 AM


    Abstract

    Java ArrayList (ArrayList (Java 2 Platform SE 5.0)) class is a fastest and easiest way to represent one-dimensional array. ArrayList not synchronized, that is cross thread access may cause problems. It holds an ordered item sequence of items (objects) like an array, but there are differences:

    • Size of an ArrayList could change dynamically, by adding or removing elements
    • An ArrayList can hold only object references, not primitives

    ...
    Attached Thumbnails Attached Files