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

 

abraskin@mbusd.org 2016_student_creations_01 > newString
prev  |  next  |  chance

Given two integers and two letters, create a string that repeats String 1, x times and String 2, y times.
There should be no spaces between the letters
Return the new string.


newString("N", "S", 1, 2) → "NSS"
newString("U", "T", 4, 2) → "UUUUTT"
newString("G", "F", 2, 6) → "GGFFFFFF"

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

public String newString(String str1, String str2, int x, int y){ }

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

Copyright Nick Parlante 2017 - privacy