I have two array's

What I would like to achieve is an output count = 3( three of the numbers 3,5,8 from Array2 are in Array1 but in the wrong place) using Math.min.

Can someone explain this process to me please. Thank you

Thank you code rum , that article helped alot

Write a program to copy the Array A={22,33,44,55,66,77,88,99} to Array B
(empty) and print the Array B.@