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

 

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

Write a method that combines the first three characters of 'str1' and 'str2' into a new string. If there are fewer than three characters in either string, use whatever is in the string. Look at the test data for examples.


test2022_05_16_APSL_firstTwo("Smile!", "Have fun") → "SmiHav"
test2022_05_16_APSL_firstTwo("ajkfhdoiwe", "weiauiosfgh") → "ajkwei"
test2022_05_16_APSL_firstTwo("1234567", "xyz") → "123xyz"

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

public String test2022_05_16_APSL_firstTwo(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: 220

Copyright Nick Parlante 2017 - privacy