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

 

abraskin@mbusd.org 2019_units1-4_practice > firN_Las
prev  |  next  |  chance

Given a non-empty String return a String created by repeating the first character n times and then the last character once.


firN_Las("Hello", 5) → "HHHHHo"
firN_Las("X", 3) → "XXXX"
firN_Las("boo", 8) → "bbbbbbbbo"

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

public String firN_Las(String s, 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: 200

Copyright Nick Parlante 2017 - privacy