-1

Hi all,

I have an ArrayList of similar objects.

Now I have to split the arraylist into multiple arraylist based on a property of these objects.

Here is the sample data set

Arraylist:

A{1, A}

A{2, A}

A{3, B}

A{4, B}

A{5, B}

A{6, C}

Result should be

Arraylist 1:

A{1, A}

A{2, A}

Arraylist 2:

A{3, B}

A{4, B}

A{5, B}

Arraylist 3:

A{6, C}

Any body has a easier way doing this...