comparing elements in 2 dimensional array using java

Arthanarisamy's Avatar, Join Date: Apr 2010
Light Poster
Hi,

I have 2 dimensional array and i should compare the elements with one another and add it into an another array!!!!!!!


The array i am using is

a x a p m

m m m m c

c p d y a


I should compare this array elements.


I tried comparing column by column but i am getting the solution.

Can some one help me with this?
virxen's Avatar, Join Date: Nov 2009
Pro contributor
give a simple but complete example

array 1 is array 2 is result array is
======== ======== ========
.............. .............. ..............
.............. .............. ..............
.............. .............. ..............
Arthanarisamy's Avatar, Join Date: Apr 2010
Light Poster
Hey thanks for your reply!!!!!!!!1




The array i am using is ( 3*5)

a x a p m

m m m m c

c p d y a


The comparison should go this way,

I should take column 1 and should compare with other columns regardless of the order!!!!

If its same then i should cluster column1 and the other columns which are same as column 1 into another array(Clustering).

If its not same then column1 will be a separate array!!!!!

Similarly i should compare the other columns!!!!!!!!!!!!!!!
virxen's Avatar, Join Date: Nov 2009
Pro contributor
do the comparison you want with words for the array you want
and tell what is the result you want to have at the end.Step by step.
Because it is not easy for me to understand exactly what you want.