Scala Programming: Test the equality of two arrays
Write a Scala program to test the equality of two arrays.
Sample Solution:
Scala Code:
Sample Output:
Original Array1 : [2, 5, 7, 9, 11] Original Array2 : [2, 5, 7, 9, 11] Whether the said two arrays are equal? true Original Array1 : [2, 5, 7, 9, 11] Original Array2 : [2, 5, 7, 9, 10] Whether the said two arrays are equal? false
Scala Code Editor :
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a Scala program to find the second smallest element from a given array of integers.
Next: Write a Scala program to find a missing number in an array of integers.What is the difficulty level of this exercise?