I want to make a method involving arrays.
Both are Integer Arrays. (And are the same size, so I don't need to check if it's the same size)
Its needs see how many of the parallel positions matches there are.
I know what's needed, but don't know how to really put it together.
int arrayone=new int;
int arraytwo=new int;
The code above I do not want in the method.
public static void Count(int?? confused hear)
if (arrayone[i] ==arraytwo[i])
some accumulator might be needed
What I have above might be on the right track, but wrong in terms of implementation.
Noob in Java. Still trying to get a feel for methods and arrays.
What I have above doesn't count the number of times the values in the corresponding positions are the same; it just indicates if the value in the corresponding position is the same. Not sure how to count it.
Any suggestions would be great.
Forgot to add the for loop but don't worry about that part.