1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

comparing elements in 2 dimensional array using java

Discussion in 'Java' started by Arthanarisamy, Apr 10, 2010.

  1. Arthanarisamy

    Arthanarisamy New Member

    Joined:
    Apr 10, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    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?
     
  2. virxen

    virxen New Member

    Joined:
    Nov 24, 2009
    Messages:
    387
    Likes Received:
    90
    Trophy Points:
    0
    give a simple but complete example

    array 1 is array 2 is result array is
    ======== ======== ========
    .............. .............. ..............
    .............. .............. ..............
    .............. .............. ..............
     
  3. Arthanarisamy

    Arthanarisamy New Member

    Joined:
    Apr 10, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    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!!!!!!!!!!!!!!!
     
  4. virxen

    virxen New Member

    Joined:
    Nov 24, 2009
    Messages:
    387
    Likes Received:
    90
    Trophy Points:
    0
    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.
     

Share This Page