JAVA help please!

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

JAVA help please!

Post by answerhappygod »

JAVA help please!
Java Help Please 1
Java Help Please 1 (24.54 KiB) Viewed 33 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")
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply