How would I write a static method that takes two arrays of characters and returns true if every character contained in the first array is also contained in the second array, otherwise it return false. The characters could be in any order in the arrays, and it makes no difference if a character occurs more than once.
Here is what I have so far but I am confused as to how to complete the task
public static boolean compare(char[] arr1, char[] arr2)
{
for(int i=0; i<arr1.length; i++)
{
}
}
Just for learning would it be possible to complete this task without using java built in methods
thanks