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

 

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

Write a method that accepts two String input parameters, 'str1' and 'str2'. The String 'str2' will be at least as long as 'str1'. Return a string that is made of any characters that are in the same position in both strings, in their original order, except do not include the character if it matches the character 'exclude'. Look at the test data for examples.


mar11_2016_APSLHL_pairs("Testing", "Trial one", "a") → "T"
mar11_2016_APSLHL_pairs("", "abc", "j") → ""
mar11_2016_APSLHL_pairs("", "", "a") → ""

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

public String mar11_2016_APSLHL_pairs(String str1, String str2, char exclude) { }

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