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

 

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

Write a method that combines two strings 's1' and 's2' by concatenating the longer string to the end of the shorter string. If the two strings have the same length, concatenate them together in the same order in the parameter list. As a precondition you may assume that both strings will have at least one character in them.


test2021_02_11_APP1SLHL_stringy("Errors are ", "everywhere!") → "Errors are everywhere!"
test2021_02_11_APP1SLHL_stringy("124", "34643636") → "12434643636"
test2021_02_11_APP1SLHL_stringy("Win", "doze") → "Windoze"

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

public String test2021_02_11_APP1SLHL_stringy(String s1, String s2) { }

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: 250

Copyright Nick Parlante 2017 - privacy