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

 

amjadm@miamioh.edu assignment3part1 > getCopy
prev  |  next  |  chance

Given a string str, make a copy from the given start index to the end index, n times, and return the new string. The start, end, and n are int parameters. We can assume the str won't be an empty string, and the start value is always less than equal the end value, and both are always acceptable and in the range.


getCopy("abc", 0, 1, 3) → "ababab"
getCopy("Hello", 0, 4, 1) → "Hello"
getCopy("a", 0, 0, 5) → "aaaaa"

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

public String getCopy(String str, int start, int end, int n) { }

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

Copyright Nick Parlante 2017 - privacy