Page 1 of 1

JAVA help please!

Posted: Fri Jul 08, 2022 6:45 am
by answerhappygod
JAVA help please!
Java Help Please 1
Java Help Please 1 (24.54 KiB) Viewed 34 times
3. Using HashSet<Character>, write an efficient method in Java that gets two Strings as input parameters and counts the number of distinct characters that appear in both parameters. Here is the method's signature: public static int countMutualCharacters(String s1, String s2){ //Your code here } Example: returns 4 (t, i, g, e) countMutualCharacters("flight attendent", "trigger")