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

 

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

Write a method that returns the string 'str' but with 'num' copies of "*" at the front and end of the string. Look at the test data for examples.


test2020_10_15_APP1SLHL_fancyString("My car has four tires.", 7) → "*******My car has four tires.*******"
test2020_10_15_APP1SLHL_fancyString("My motorcycle needs a rest...", 1) → "*My motorcycle needs a rest...*"
test2020_10_15_APP1SLHL_fancyString("...because it is two tired!", 2) → "**...because it is two tired!**"

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

public String test2020_10_15_APP1SLHL_fancyString(String str,int num) { }

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