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

 

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

Write a method that accepts two string input parameters and returns a single string made up of those two strings with a space between them, but with the first letters of the strings swapped. For example, if the strings are "computer" and "programming" you would return "pomputer crogramming" as a result. You may assume that both input parameters will have at least one character (no empty strings).


oct18_2016_APSLHL_stringSwap("a", "time") → "t aime"
oct18_2016_APSLHL_stringSwap("x", "a") → "a x"
oct18_2016_APSLHL_stringSwap("first period", "programming") → "pirst period frogramming"

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

public String oct18_2016_APSLHL_stringSwap(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: 210

Copyright Nick Parlante 2017 - privacy