Hello i need help comparing two array lists. For this program i am comparing 2 array lists. The list is integers entered by the user the second is random generated numbers. So far in my program i am able to compare the 2 arrays together and output if they are equal or not however i need the program to output even if atleast one if the integers match, EXAMPLE list one: 1, 2 ,3 ,4, 5. LIST TWO: 1, 3, 3, 3, 3. Since the first number matches i want it to out put there is one match, so on and so forth with if there are 3 or 4 matching integers. here is my code so far. Please Help.

public static void main(

String[] args)

{

final int NbrsEntered = 5; //Number of guessed numbers entered

final int LOTTOnbr = 5;

int[] numbers = new int[NbrsEntered];

int[] randomNum = new int[LOTTOnbr];

//int[] TestArrayOne = { 1, 2, 3, 4, 5 };

//int[] TestArrayTwo = { 1, 2, 3, 3, 5 };

boolean arraysEqual = true;

int index = 0;

// Create a Scanner object for keyboard input.

Scanner keyboard = new Scanner(System.in);

//Generate random Numbers

Random RanNum = new Random();

/** if (TestArrayOne.length != TestArrayTwo.length)

arraysEqual = false;

while (arraysEqual && index < TestArrayOne.length)

{

if (TestArrayOne[index] != TestArrayTwo[index])

arraysEqual = false;

index++;

}

if(arraysEqual)

System.out.println("Equal");

else

System.out.println("Not");

*/

//Enter the 5 lottery numbers

for (index = 0; index < NbrsEntered; index++)

{

System.out.print("Enter digit " + (index + 1) + ": ");

numbers[index] = keyboard.nextInt();

}

//Generate the random lottery numbers

for (index = 0; index < NbrsEntered; index++)

{

System.out.println();

randomNum[index] = RanNum.nextInt(10);

}

System.out.println("Lottery numbers: ");

for (int randomNumElement : randomNum)

{

System.out.print(randomNumElement + " ");

} System.out.println();

//Output player numbers

System.out.println("Player numbers: ");

for (int numbersElement : numbers)

{

System.out.print(numbersElement + " ");

} System.out.println();

//Comparing the 2 arrays

if (numbers.length != randomNum.length)

arraysEqual = false;

while (arraysEqual && index < numbers.length)

{

if (numbers[index] != randomNum[index])

arraysEqual = false;

index++;

}

if(arraysEqual)

System.out.println("Equal");

else

System.out.println("0 matching numbers better luck next time");

}