id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > mar7_2017_APSLHL_countMatches
prev  |  next  |  chance

Write a method that returns the number of 'matches' between two strings. To be a 'match' both strings must have the same character in the same position in both strings. Note that the two strings could have different lengths. Look at the test data for examples.


mar7_2017_APSLHL_countMatches("", "") → 0
mar7_2017_APSLHL_countMatches("x", "x") → 1
mar7_2017_APSLHL_countMatches("x", "xyz") → 1

...Save, Compile, Run (ctrl-enter)

public int mar7_2017_APSLHL_countMatches(String str1, String str2) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 290

Copyright Nick Parlante 2017 - privacy