Compaing objects in two arrays. Would Really appreciate your help experts
i have a program that reads data from a text file, i have one string in the file that needs to be read as seperate chars e.g fota as they both stand for something. here is how i did this.
if(line.equals("m")){
name = reader.readLine();
surname = reader.readLine();
enjoytime = reader.readLine();
char[] menjoytime = enjoytime.toCharArray();
System.out.println(menjoytime1);
hatetime= reader.readLine();
Male male =new Male(name, surname, enjoytime, hatetime);
listMale.add(male);
now i need to compare the elements in the array for each that element that matches a females objects i need to apply the below ideas, but i can't do this without knowing how to compare the objects within in the array to see how many match is this possible and if so how?
an example would be one array contaning fota and another tca should equal 2 elements that match thus i should be able to create some code that will match my idea below.
* for each char in enjoytime that matches +2 compatbility point,
* for each char in hate that matches +1 compatbility point
* for each char in enjoytime that matcher in hatetime -2 compatbility points
* then match the two with that have a similar or same number.
* interat through male and female arraylist to find best match.
* then print the two couples to screen.

