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

 

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

Write a method that has an input parameter 'strs' which is an array of strings. Return a single string that is made up by combining all the individual strings in 'strs' into one big string. Look at the test data to see examples.


test2022_12_08_APP1SLHL_oneString(["Once upon a midnight dreary, while I pondered, weak and weary, Over many a quaint and curious volume of forgotten lore— ", "While I nodded, nearly napping, suddenly there came a tapping, ", "As of some one gently rapping, rapping at my chamber door. ", "Tis some visitor, I muttered, tapping at my chamber door— Only this and nothing more."]) → "Once upon a midnight dreary, while I pondered, weak and weary, Over many a quaint and curious volume of forgotten lore— While I nodded, nearly napping, suddenly there came a tapping, As of some one gently rapping, rapping at my chamber door. Tis some visitor, I muttered, tapping at my chamber door— Only this and nothing more."
test2022_12_08_APP1SLHL_oneString([]) → ""
test2022_12_08_APP1SLHL_oneString(["x"]) → "x"

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

public String test2022_12_08_APP1SLHL_oneString(String[] strs) { }

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

Copyright Nick Parlante 2017 - privacy