I am a beginner in Java and I will like to know if there's a way to compare characters in a char Array with other characters in another char Array in order to see if they have characters that match. Not to see if they contain exactly the same characters in the same sequence as most examples explain.
For instance:
char [] word1= {'a','c','f','b','e'};
char[] word2= {'a','b','c','d','e','h','j','f','i','m'};
and using maybe if statements to say that word1 contains the characters in word2 so it is correct. Else it is incorrect if word2 is missing at least one character that word1 has.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…